Answer to Question #274977 in Java | JSP | JSF for Arnold

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.

1
Expert's answer
2021-12-05T02:15:20-0500


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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS