ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

Category: Java

Final Keyword in Java

Final keyword in Java can be used with class, object, method and variables. It is used in order to restrict the user. If final keyword is used along with the class, then that class cannot be extended. If final keyword is prefixed before method then we will not be able to override that method. If […]

Method Overriding in Java

Method Overriding If subclass/child class has the same method as declared in the super/parent class (signature of method in both class should be same), it is known as method overriding in java. In other words, If subclass provides the specific implementation of the method that has been provided by one of its parent class, it […]

Polymorphism in Java

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Any Java object that can pass more than one IS-A test is considered to be polymorphic. In polymorphism, two things […]

Final object in Java

Subject: Final Object in Java We cannot reinitialized Final Objects in Java. For Example: See the below code < View plain text > java class P{   int i ;   }   class Manager{   public static void main(String args[]) {   final P p1=new P();   P.i=10; //modifying i not p1 , allowed […]

Difference between String class and String Buffer/ String Builder class in Java

  Subject: In this post we will learn , difference between String class and String Buffer/ String Builder class in Java. String objects are immutable while String Buffer objects are mutable. String temp1=” Rahul”; String temp1=”Rahul”+”Tiwari” ; System.out.println(temp1); Here, output will be Rahul Tiwari. But two objects will be created. In String class, toString, equals […]

Page 4 of 41234
ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!