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
How we can you use preparedstatement.
What are the exceptions in jdbc?
Why do we need jdbc driver?
How will you perform truncation using JDBC?
What are the different types of interfaces in the api component?
What is resultsetmetadata?
How do you insert images into database using jdbc?
Name different methods for getting streams.
what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();
What are the types of statements in jdbc?
Explain jdbc savepoint?
What is the difference between setmaxrows(int) and setfetchsize(int)?
What is the query used to display all tables names in SQL Server (Query analyzer)?
Differentiate between stored procedure and functions?
Write a program JDBCcode forfetching student database with SQL.