How to display all the prime numbers between 1 and n (n is the number, get the input from user)


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

Post New Answer

More Core Java Interview Questions

What do you mean by constant time complexity?

0 Answers   Amazon,


How to write custom exception in java?

0 Answers   Cyient,


What is JVM and is it platform independent?

0 Answers  


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.

0 Answers  


What is the difference between multitasking and multithreading in Java

0 Answers   Sans Pareil IT Services,






What is widening and narrowing in java? Discuss with an example.

0 Answers   Amdocs,


What are the super most classes for all the streams?

0 Answers  


What are the application of stack?

0 Answers  


Does printwriter create a file?

0 Answers  


Why does java have two ways to create child threads?

0 Answers  


What are the restrictions imposed on method overriding?

0 Answers  


Name the runtime exceptions that occurs frequently?

4 Answers  


Categories