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 sub() method
without creating object. that all...
so, java is not pure object oriented ..
Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is the difference between executing, executequery, executeupdate in jdbc?
How to rollback a JDBC transaction?
What are the differences between setmaxrows(int) and setfetchsize(int)?
What is com mysql jdbc driver?
What are jdbc?
What is JDBC DataSource and what are it’s benefits?
What is the purpose of jdbc resultset interface?
Explain the difference between resultset and rowset in jdbc
Where is jdbc url mysql?
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
How MS-Access DB can be accessed over a network, using JDBC API?
What is thin driver in jdbc?
Which is better jpa or jdbc?
What is jdbc odbc bridge in java?
What is two-phase commit in the database?