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...


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.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

0 Answers  


What is the difference between heap and stack memory?

0 Answers  


What about features of local inner class?

0 Answers  


What is a boolean field?

0 Answers  


Can we define static methods inside interface?

0 Answers  


When arithmeticexception is thrown?

0 Answers  


What is the major drawback of internal iteration over external iteration?

0 Answers  


How to add panel to a Frame?

5 Answers  


What is a bufferedreader?

0 Answers  


Which method must be implemented by all threads?

0 Answers  


How do you remove spaces in java?

0 Answers  


Where are the local variables stored?

0 Answers  


Categories