Computer Science Homework Solutions
Problem
#25869

Java Programming

I keep getting this error message java.lang.NoSuchMethodError: main
Exception in thread "main" .  What I am doing wrong?

public class PersonTwo {



  public String name = "John Smith";

  public String job = "Doctor";



  public void display() {

    System.out.println("My name is " + name + ", I am a " + job);

    }

}

Solution
What is this?
By OTA - Overall OTA Rating
Farhan Chowdhury, MS - 4.4/5
Purchase Cost Now
$2.19 CAD (was ~$3.99)
Included in Download
  • Plain text response
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Edit Java program for input of numbers only.. - Edit Java program for input of numbers only. If the user inputs a letter the program must abort with a messegae like "Program aborted by user". Please explain the code. import java.util.*; publi ...
  • Java Programming - Access the emply and emplyC Java program. Code, compile, and run the program. There are five lines of code marked (1)..(5) that you must explain after analyzing the code, running the program, and exam ...
  • Explain the usage of "Inheritence" with a sample program - What is the output of this Java program? public class InheritanceProblem { public static void main(String[] args) { System.out.println(new X().message()); System.out.println(new Y().message()) ...
  • Java programming - Text printing - Please see below. I am really confused on these questions and would love any guidance you could give. Examples are attached. Thanks so much in advance! (see attachment) Compile a two-line text-prin ...
  • Creating a Java Program - See Attach Files. Use the modular approach and build the program piece by piece. Use stubs and test each part of the program before combining the error free segments of code at the end. The modular ...
Browse