Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 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


Please Help Members By Posting Answers For Below Questions

What is a merge field?

922


What is jndi lookup?

930


What is ODBC and JDBC? How do you connect the Database?

1038


What does executequery return in java?

914


What should be done for auto generating primary key id in a table ?

968


What is jdbc and its advantages?

1051


What is connection commit?

922


How vendor Naming registry supports JNDI?

2194


What is the JDBC syntax for using a literal or variable in a standard Statement?

989


How can I use the JDBC API to access a desktop database like Microsoft Access over the network?

1013


Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?

992


What is the use of JDBC DriverManager class?

1065


Is jdbc faster than odbc?

910


What is getconnection method in java?

921


How can I manage special characters when I execute an insert query?

931