Java dot and new Operator:
The dot operator( . ) is used to access the instance variables and methods of class objects. Example
e1.name ; //reference to the variable name e1.sal( ); //reference to the method sal( )
it is also used to access classes and sub-packages from a package that I have discussed in middle.
Java new operator:
new operator is used to create object of a class. We know that an object is nothing but a dynamic memory area which is created by JVM.
The general form is :
classname objectname=new classname( ); Student s=new Student( ); // s is an object of the Student class
Java Training | Python Training | Machine Learning with Python Training | Deep Learning with Python Training | Data Science with Python Training | Projects
SILAN Technology, BBSR Call to: 9439202111 | 9658317757 | 0674-2361252