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 jdbc thin client?
What happens if connection is not closed in jdbc?
What are the steps to connect to a database in java?
Give steps to connect to the db using jdbc?
What is xe in oracle jdbc url?
What are the conditions applies to varchar variable, when using in procedures?
Does JDBC support stored procedures?
What is database deadlock ? How can we avoid them?
What is encrypted connection?
What is statement and resultset in jdbc?
What is jdbc in dbms?
what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();
What is com mysql jdbc driver?
What are the different types of statements? How we can you use preparedstatement.
What is JDBC Connection? Explain steps to get Database connection in a simple java program.