Difference in the use of print, println, and printf.
Answer Posted / glibwaresoftsolutions
The items can be printed using print, println, or printf, but print prints every element while keeping the cursor in the same line. The cursor is moved to the next line via println. Additionally, we can use format identifiers with printf.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the font and fontmetrics classes in java programming?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Can a java program have 2 main methods?
What is the difference between assignment and initialization?
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.
Can a class extend more than one class?
What are the different types of collections in java?
Is array a class?
How do you do absolute value in java?
When can an object reference be cast to an interface reference in java programming?
What is the generic function?
Why put method is used?
Write a program to find maximum and minimum number in array?
How do you write a conditional statement?
Can abstract class have private constructor?