public class Clock
{
private int newHour;
private int newMinutes;
private int newSeconds;
public Clock ()
{
}
public Clock (int newHour, int newMinutes, int newSeconds)
{
this.newHour = newHour;
this.newMinutes = newMinutes;
this.newSeconds = newSeconds;
}
public int getNewHour(int newHour){
return this.newHour;
}
public int getNewMinutes (int newMinutes){
return this.newMinutes;
}
public int getNewSeconds (int newSeconds){
return this.newSeconds;
}
public void setHour(int newHour){
this.setHour = setHour;
}
public void setMinutes (int newMinutes){
this.newMinutes = newMinutes;
}
public void setSeconds (int newSeconds){
this.newSeconds = newSeconds;
}
public void display (){
System.out.println (int newHour + int newMinutes + int newSeconds);
public String showTime (){
System.out.println ("hh:"+ "mm:"+"ss");
}
public static void main(String[] args)
{
Clock objClock = new Clock();
objClock.showTime();
objClock.display();
}
}
N_765
0
Newbie Poster
Recommended Answers
Jump to PostYou didn't say anything about the error. Is it line 38 - invalid syntax?
All 2 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
N_765
commented:
Can't get the comment to work sorry
+0
zemiak
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.