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 jdbc and jpa?
What is a jdbc connection?
How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?
How can we disable a constraint ?
RowSetInternal caller and returns void. What can I do in the readData method?
What is device controller?
Explain the difference between inner and outer join ?
What is JDBC RowSet? What are different types of RowSet?
Explain the role of driver in jdbc.
How many categories of jdbc drivers are there?
What are the differences between stored procedure and functions?
Is uri the same as url?
What are jdbc?
What causes the "No suitable driver" error?
What is Apache DBCP API?