It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

A little java help.

page: 1
0

log in

join
share:

posted on Feb, 1 2006 @ 04:56 PM
link   
Hey, im going to be taking an object oriented paradigm(sp?) using java during intersession in a few months. Im trying to brush up on it a bit and have come across a simple little problem that have no idea how to solve.

The problem is.

"Wriyte an application that displays the numbers 1 to 4 on the same line, with each pair of adjacent numbers seperated by one space. Write the program using the following techniques:

a) Use one system.out.printLn statement.
b) Use four system.out.print statement.
c) Use one system.out.printf statement.

Even with my reading i dont know where to begin with this.

[edit on 1-2-2006 by Uber Fr0g]



posted on Feb, 1 2006 @ 08:54 PM
link   
This is what i have so far but im lost.





public class Display
[
public static void main(String [] args)
[
System.out.print("1 ");
System.out.print("2 ");
System.out.print("3 ");
System.out.print("4 ");
System.out.println(" ");



new topics
 
0

log in

join