Enter your keyword

Call by Value & Call by Refrence

Definition in java…. Example class Workways{ int data=50; void change(int data){ data=data+100;//changes will be in the local variable only } public static void main(String args[]){ Workways op=new Workways(); System.out.println(“before change “+op.data); op.change(500); System.out.println(“after change “+op.data); } } Commonly asked interview questions on Constructors 1.What is difference between call by value and call by reference Answer […]

AWT Swings in JAVA

Definition Constructor in java is a special type of method which is used to initialize the object. Constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object. Java provides default constructor for every java class implicitly. Commonly asked interview questions on Constructors 1. Define Constructor? Answer […]

Constructors – Java Deep Dive

Definition Constructor in java is a special type of method which is used to initialize the object. Constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object. Java provides default constructor for every java class implicitly. Example class ConstructorsDrive { private int var; public ConstructorsDrive(int num) […]