Question #274977

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.

Expert's answer



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();
    }
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS