❮ Previous Next ❯

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
❮ Previous Next ❯

Follow Us


Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Email: info@silantechnology.com
      Phone: 0674-2361252
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved