Write a java program that declares and displays a named constant that holds the number of seconds in a minute and a variable to represent the number of your subject. Name the class as DataStore and save the file. Debug syntax and logical errors if there any in the program.
package datastore;
public class DataStore {
public int second;
public void display(){
System.out.println(second);
}
public static void main(String[] args) {
DataStore d = new DataStore();
d.second = 60;
d.display();
}
}
Comments
Leave a comment