is java pure object oriented or not ?

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


Please Help Members By Posting Answers For Below Questions

What are collection pools?

515


Which type of JDBC driver is the fastest one?

568


What is a merge field?

495


Why do we use jdbc in java?

542


What is database deadlock ? How can we avoid them?

511






How can I get information about foreign keys used in a table?

528


Expalin the method of calling a stored procedure from jdbc.

541


Explain jdbc savepoint?

563


Can I get a null resultset?

545


What is type 4 jdbc driver?

477


How many jdbc driver types are there?

479


What is serialization and deserialization in java programming?

520


How many ways can you update a result set?

559


How can we store the file in the oracle database?

518


What port does jdbc use?

490