- A class can be inherited by using the keyword extends.
- The class which is inherited is called Super class or Parent class.The class which does the inheritance is called Subclass.
- The private members of the super class are cannot be accessed by the sub class.
July 27, 2011
Subscribe to:
Post Comments (Atom)
Connecting Java program to Database
It is very simple to establish a connection to the Database from a Java program Class.forName("com.mysql.jdbc.Driver...
-
It is very simple to establish a connection to the Database from a Java program Class.forName("com.mysql.jdbc.Driver...
-
Procedural languages are difficult to relate with the real world objects. Procedural codes are very difficult to maintain , if the code ...
Is there any other possibilities for accessing private variables in subclass???
ReplyDeleteThere is no other possibility to access the Private members of a class.
ReplyDelete