How OOPS concept is achieved in Java?
Answers were Sorted based on User's Feedback
Answer / kk
Encapsulation,Inheritance,Polymorphism are OOPS principles.
In Java, these OOPS principles are achieved as follows:
Encapsulation & data hiding is achieved thru access modifiers
Inheritance is achieved thru Interfaces
Polymorphism is achieved thru overloading of methods
| Is This Answer Correct ? | 43 Yes | 11 No |
Answer / james
1) Encapsulation:- is achieved through
classes.(Binding/Storing data and methods as a single unit )
2) Abstraction:-it is achieved through private, protected,
public, default keywords.
3)Inheritance through interfaces.
4)polymorphism is achieved through method overloading and
constructor overloading.
5)Message Passing -through objects calling
| Is This Answer Correct ? | 30 Yes | 6 No |
by polymorphism,inheritance,abstraction,encapsulation
| Is This Answer Correct ? | 20 Yes | 8 No |
Answer / ranjan
Encapsulation which is achieved by making classes.
Inheritance which is achieved by extending class and implementing interfaces.
polymorphism is achieved by function overriding and function overloading. Operator overloading is not allowed in java although implicitly string class uses + operator..
note : Abstraction is nothing its just showing functionality and hiding complexity
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / rahul
Thru java encapsulation, inheritence, polymorphism.
| Is This Answer Correct ? | 1 Yes | 5 No |
Are there any tools available in java to create reports?
Is logger a singleton?
What happens when a class is made static like if a field or member is made static it becomes class variable and is shared by all the object of the class?
int a=1; float b=1.0; System.out.println(a==b);
13 Answers CTS, Honeywell, McAfee,
Is array serializable java?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
how to minimize the functionality to will not force garbage collector?
We have two methods to create methods the threads. 1. Implementing runnable interface 2. Extending to thread class and overriding run method. Among these two which one is better and why? Please explain me in detail.
What is mysql driver class name?
Why method overriding is used?
Why do we use threads in java?
Can a class have multiple constructors?