Write a program to display the names of five fruits
with a single System.out.println(); statement, but in different
lines.
Answers
Answered by
59
Hey there!
♣ Program to display the names of five fruits with a single System.out.println(); statement, but in different lines.
public class Question2
{ static void main()
{ System.out.println("Apple\nOrange\nGuava\nMango\nGrapes");
} }
Hope It helps You!
Answered by
47
public class fruits
{
public static void main(String args[])
{
System.out.println("Mango\n"+"Apple\n"+"Banana\n"+"Grapes\n"+"Orange\n");
}
}
Similar questions