Answer Posted / sathish.pk
java is not pure object oriented .
because, we are using "Static" keyword.
for example:
-------------
public class Sample{
public static void add(){
int a=1,b=2;
System.out.println("Add Value="+(a+b));
}
public void sub(){
int a=1,b=2;
System.out.println("Sub value="+(b-a));
}
public static void main(String args[]){
Sample sam=new Sample();
sam.sub();
Sample.add();
}
}
in above example:
------------------
we are creating object for access add() method, but
we are not creating object for access sub() method. because,
it is static method. so, here we are accessing add() method
without creating object. that all...
so, java is not pure object oriented ..
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
What is jdbc driver for sql server?
What are the different types of interfaces in the api component?
Explain the necessary steps to connect to the database in java?
What are the 4 types of jdbc drivers?
How many types of JDBC Drivers are present and what are they?
Why resultset is used in java?
How can we store the file in the oracle database?
What are the differences between execute, executequery, and executeupdate?
What causes the "No suitable driver" error?
What is difference between odbc and jdbc?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
How can I instantiate and load a new CachedRowSet object from a non-JDBC source?
How many types of jdbc drivers are available?
Explain the importance of drivermanager.