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 odbc and jdbc in dbms?
Which package is used for jdbc application?
Where is jdbc url mysql?
What is the return type of class.forname() method?
What are the common jdbc exceptions?
Which database is used with java?
Is oracle client required for jdbc connection?
Why do we use jdbc statements?
Where is jdbc used?
How do I connect to jdbc?
How can we maintain the integrity of a database by using jdbc?
What is the function of setautocommit?
When do we use execute method in java jdbc?
What is in term of jdbc a datasource?
How does jdbc driver work?