:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
Categories >> Software >> Java Related >> Java J2EE >> Core Java


Question Explain in detail about encapsulation with an example?
 Question Asked In Companies ::     < I also faced this Question! >
 Question Submitted By :: guest
  Answer Posted By  
it is way to combine field and mathod in a single entity
like a capsule ;
class A
int i;
void m(int i)
//body of this mathod ;
like this way;

Is This Answer Correct ?    6 Yes 0 No

  sanjay singh chauhan
View All Answers
Please Help Members By Posting Answers For Below Questions
 Question Views   Select
What releases of Java technology are currently available? What do they contain? 530
Can you give names of Container classes? 800
how come we know the object is no more used in the class? 3078
What is Applet Stub Interface ? 810
What is your platform?s default character encoding and how to know this? 652
What are the differences between Java 1.0 and Java 2.0? 496
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none. 999
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this? 788
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram. 554
where the static methods will live ,on stack ? can you explain brefly 403
How to solve the problem of generating the unique hash keys with hash function? 416
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites. 4119
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements? 4354
which pattern is default in scanner package? 734
how to open and edit XML file in Weblogic??? 475
E-Mail New Answers        Answer Selected Questions