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 are the packages are used in jdbc?
How do I stop nullpointerexception?
What is statement and resultset in jdbc?
List some new features available in jdbc 4.0?
How to insert an image or raw data into database?
What is 2 phase commit?
How do I set properties for a JDBC driver and where are the properties stored?
What is resultset?
How do I find ojdbc jar version?
Give a way to check that all result sets have bin accessed and update counts are generated by execute method.
What is type 4 jdbc driver?
What are the different types of drivers under jdbc?
Is uri the same as url?
What is meant by jdbc and odbc?
Name the types of jdbc drivers.