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
How do we load the drivers?
How can I retrieve a String or other object type without creating a new object each time?
Explain about column name and getter method?
What is the difference between jdbc and jndi?
When do we get java.sql.SQLException: No suitable driver found?
What is SQL Warning? How to retrieve SQL warnings in the JDBC program?
How to rollback a JDBC transaction?
How many types of resultset are there in jdbc?
Which package is used for jdbc application?
What is jndi lookup?
What are the types of jdbc drivers that exist?
How to insert an image or raw data into database?
What is the reason why we need a jdbcrowset like the wrapper around resultset?
Why we use jdbc instead of odbc?
How many types of JDBC Drivers are present and what are they?