×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
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
98
Answers
What does Interface consist of in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 14:48:36
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
Use find() to find multiple subsequences in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 14:37:50
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
Phone Number validation using Java Regular Expressions
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 12:11:40
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
What is Default access level in Java?
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 12:04:09
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
Creating a Multilevel Inheritance Hierarchy in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 11:37:42
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
Demonstrate the clone() method in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 11:19:18
An object can be cloned using the clone() method in Java. The class whose object is cloned should implement the interface java.lang.Cloneable otherwise the exception CloneNotSupportedException is thrown when clone() method is used.A program that demonstrates the clone() method in Java is given as follows:Example Live Democlass CloneClass implements Cloneable { ...
Read More
How to use the asList() method of the Arrays class to create a Vector object
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 11:09:07
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
Demonstrate static variables, methods and blocks in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 10:52:08
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
Overloading Varargs Methods in Java
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 15-Feb-2019 10:29:05
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("\nNumber of int arguments are: " + args.length); ...
Read More
When Method Overriding occurs in Java?
Java 8
Object Oriented Programming
Programming
Jai Janardhan
Published on 12-Feb-2019 15:43:41
Method overriding occurs in Java if the child class has the same method as that declared in the parent class. The method in the child class has the same name and parameters as that of the method in the parent class. Method overriding is useful in runtime polymorphism.A program that ...
Read More
1
2
3
4
5
6
7
...
10
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout