- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Jai Janardhan has Published 70 Articles
Jai Janardhan
449 Views
The method java.time.Matcher.group() is used to find the subsequence in the input sequence string that is a match to the required pattern. This method returns the subsequence that is matched by the previous match which can even be empty.A program that demonstrates the method Matcher.group() in Java regular expressions is ... Read More
Jai Janardhan
574 Views
A method with variable length arguments(Varargs) can have zero or multiple arguments. Also, Varargs methods can be overloaded if required.A program that demonstrates this is given as follows:Example Live Demopublic class Demo { public static void Varargs(int... args) { System.out.println("Number of int arguments are: " + args.length); ... Read More
Jai Janardhan
7K+ Views
The static variable is a class level variable and it is common to all the class objects i.e. a single copy of the static variable is shared among all the class objects.A static method manipulates the static variables in a class. It belongs to the class instead of the class ... Read More
Jai Janardhan
1K+ Views
A Vector can be created from an Array using the java.util.Arrays.asList() method.A program that demonstrates this is given as follows:Example Live Demoimport java.util.Arrays; import java.util.Vector; public class Demo { public static void main(String args[]) { Integer[] arr = { 3, 1, 9, 6, 4, 8, 7 ... Read More
Jai Janardhan
8K+ Views
Inheritance involves an object acquiring the properties and behaviour of another object. So basically, using inheritance can extend the functionality of the class by creating a new class that builds on the previous class by inheriting it.Multilevel inheritance is when a class inherits a class which inherits another class. An ... Read More
Jai Janardhan
494 Views
The default access level is available when no access level is specified. All the classes, data members, methods etc. which have the default access level can only be accessed inside the same package.A program that demonstrates the default access level in Java is given as follows:Example Live Democlass Employee { ... Read More
Jai Janardhan
3K+ Views
The phone number can be validated using the java.util.regex.Pattern.matches() method. This method matches the regular expression for the phone number and the given input phone number and returns true if they match and false otherwise.Note: We are considering a demo number for our example since we cannot use our phone ... Read More
Jai Janardhan
458 Views
An element of a Vector can be searched using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurrence of the element that is specified. If the element is not available in the Vector, then this method returns -1.A program that demonstrates this is given as follows:Example Live Demoimport ... Read More
Jai Janardhan
82 Views
The find() method finds the multiple subsequences in an input sequence that matches the pattern required. This method is available in the Matcher class that is available in the java.util.regex packageA program that uses the find() method to find multiple subsequence in Java is given as follows:Example Live Demoimport java.util.regex.Matcher; import ... Read More
Jai Janardhan
194 Views
An interface can be defined using the interface keyword. It contains variables and methods like a class but the methods in an interface are abstract by default unlike a class. An interface is primarily used to implement abstraction and it cannot be instantiated.A program that demonstrates an interface in Java ... Read More