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

How do we load the drivers?

931


How can I retrieve a String or other object type without creating a new object each time?

1136


Explain about column name and getter method?

1008


What is the difference between jdbc and jndi?

942


When do we get java.sql.SQLException: No suitable driver found?

908


What is SQL Warning? How to retrieve SQL warnings in the JDBC program?

988


How to rollback a JDBC transaction?

1033


How many types of resultset are there in jdbc?

918


Which package is used for jdbc application?

922


What is jndi lookup?

888


What are the types of jdbc drivers that exist?

949


How to insert an image or raw data into database?

950


What is the reason why we need a jdbcrowset like the wrapper around resultset?

923


Why we use jdbc instead of odbc?

919


How many types of JDBC Drivers are present and what are they?

1063