The program below is the answer to Liang’s Introduction To Java Programming (9th Edition) Chapter 1 Exercise 1.2.
Question: Write a program that displays Welcome to Java five times.
1 2 |
/**<br /> *<br /> * @Author: Aghatise Osazuwa<br /> * Website: www.cscprogrammingtutorials.com<br /> *<br /> * Exercise 1.2 - Display Five Messages<br /> *<br /> */ <br /><br />public class Ex01_02 {<br /><br /> public static void main(String[] args) {<br /><br /> System.out.println("Welcome to Java");<br /> System.out.println("Welcome to Java");<br /> System.out.println("Welcome to Java");<br /> System.out.println("Welcome to Java");<br /> System.out.println("Welcome to Java");<br /><br /> }<br />}<br /> |
Click here to see other solutions to Introduction to Java Programming.
3 Comments
Avi Hi,
Displaying 7 messages is beyond the scope of this already advanced tutorial.
Can anyone elaborate on how to make a program that displays 7 messages?
This is such a great resource that you providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.