What is abstraction with strong example program?
(not a general program)

Answers were Sorted based on User's Feedback



What is abstraction with strong example program? (not a general program)..

Answer / cherry

abstraction means hiding the implementation part of a
particular process.Like we are calling createStatement()
method on Connection object to get the Statement object.It
is also abstraction because that method implementation is
done by jdbc engine developer.

Is This Answer Correct ?    6 Yes 0 No

What is abstraction with strong example program? (not a general program)..

Answer / gaurav (accenture)

Just to tell you guys that abstraction and encapsulation are two different concepts of oops. thats why they've use two terminologies. Common Sense. Right.!

The meaning of abstraction is just the same as it is in English but applying it in coding world. Simply we can say as “what” the method or a module does not “how” it does it. The word abstraction is to distill a complicated system down to its most fundamental parts and describe these parts in a simple, precise language.

Let’s compare Java and C++. We have a good example of abstraction. In C++, you have to deal with pointers and references a lot. You have to deal a lot of garbage collection. In essence, you have to work on a low level. (C and C++ in turn abstracted a lot of even lower level machine code.) In Java, those things are abstracted away. You just assume they exist. In essence, abstraction means that you are working on a higher level. You don’t care how pointers work in Java, you just assume that they work. You don’t have to concentrate on the lower level stuff, you work on higher level.

I hope it covers everything.

Is This Answer Correct ?    2 Yes 0 No

What is abstraction with strong example program? (not a general program)..

Answer / satishkumar vishwakarma

Abstraction means showing only relevent data. means that it
shows only that part of code which is necessory for other
class rather than showing all information. Encapsulation
also does same thing. the whole funda of Abstration and
Encapsulation is Class and Access Specifiers.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Core Java Interview Questions

I declared main() method as private. But it still running and displaying the output. Please Answer it . Code Snippet as Below: import java.io.*; class over { private static void main(String[] args) { int high = Integer.MAX_VALUE; int overflow = high + 1; int low = Integer.MIN_VALUE; int underflow = low - 1; System.out.println(high + "\n" +overflow +"\n"+ low +"\n"+underflow); //System.out.println(overflow); //System.out.println(low); //System.out.println(underflow); } }

4 Answers   Cap Gemini,


string is immutable? right every one knows that, my question is it advantage or disadvantage making string immutable?

5 Answers   HCL,


How to read and write image from a file ?

0 Answers  


What is static import in java?

0 Answers  


What is meant by class?

0 Answers  






What is a lock or purpose of locks in java?

0 Answers  


What is the buffer limit?

0 Answers  


To the class members how can we provide security?

1 Answers   Aspire,


Explain about class in java?

0 Answers  


What is the difference between the file and randomaccessfile classes?

0 Answers  


How to perform Singleton of the java class object on multi JVM?

2 Answers  


public class AboutStrings{ public static void main(String args[]){ String s1="hello"; String s2="hel"; String s3="lo"; String s4=s2+s3; //to know the hash codes of s1,s4. System.out.println(s1.hashCode()); System.out.println(s4.hashCode()); // these two s1 and s4 are having same hashcodes. if(s1==s4){ System.out.println("s1 and s4 are same."); }else System.out.println("s1 and s4 are not same."); } } Somebody told me that, == operator compares references of the objects. In the above example even though s1 and s4 are refering to same object(having same hash codes), it is printing s1 and s4 are not same. Can anybody explain in detail why it is behaving like this? Thanks in Advance RavuriVinod

4 Answers   TCS,


Categories