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.
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
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc