Question: User.java class User{ private String first_name; private String last_name; private String dob; //date of birth private String pob; //place of birth public String getFirst_name() {

User.java class User{ private String first_name; private String last_name; private String dob; //date of birth private String pob; //place of birth public String getFirst_name() { return first_name; } public void setFirst_name(String first_name) { this.first_name = first_name; } public String getLast_name() { return last_name; } public void setLast_name(String last_name) { this.last_name = last_name; } public String getDob() { return dob; } public void setDob(String dob) { this.dob = dob; } public String getPob() { return pob; } public void setPob(String pob) { this.pob = pob; } // overriding this method to display user details public String toString() { return "First Name: "+this.first_name+" Last Name: "+this.last_name+ " Birthday : "+this.dob+" Born in : "+this.pob; } } I WANT TO CORRECT THIS CODE IN JAVA. WHEN I TRIED TO RUN IN MY TERMINAL HAVE THIS ERROR: Error: Main method not found in class User, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!