-
January 16th, 2013, 11:19 AM
#1
serious help needed, java code
I am new to Java and this site. My assignment is to write a program that displays a time in this format(00:00:00) in one line of code. can anyone help me with this. the following is what i have started......
Please help!!!!!
import java.util.Scanner;
public class time {
public static void main(String[] args){
Scanner time = new Scanner(System.in);
String hour = time.next();
System.out.print("" + hour + ":";");"
String min = time.next();
String sec = time.next();
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|