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
What is a merge field?
What is jndi lookup?
What is ODBC and JDBC? How do you connect the Database?
What does executequery return in java?
What should be done for auto generating primary key id in a table ?
What is jdbc and its advantages?
What is connection commit?
How vendor Naming registry supports JNDI?
What is the JDBC syntax for using a literal or variable in a standard Statement?
How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?
What is the use of JDBC DriverManager class?
Is jdbc faster than odbc?
What is getconnection method in java?
How can I manage special characters when I execute an insert query?