Home > Back-end >  Java small white for help
Java small white for help

Time:10-21

CodePudding user response:

1 source files with public class name, so is the Person. Java
2 has two classes, so there will be two class files, namely two byte code files, class files and the name of the class name (unless the inner class), so a Person. The class, one is Xiti. Class
3 Person, not the main method, so can't direct execution, will be prompted to find the main method error; Xiti name is lower case, and the class name, so you will be prompted to find class, by the same token, the xiti. Class, too, the Java command don't need a suffix, so will be prompted to find classes, Java xiti can normal execution, is the information in the input code (only one line, and there is a space between Chinese and English)

CodePudding user response:

1/f, positive solutions,!!!!!!!!!!!!!!

CodePudding user response:

reference 1st floor qybao response:
1 source files with the public class, with the same. So the Person is Java
2 has two classes, so there will be two class files, namely two byte code files, class files and the name of the class name (unless the inner class), so a Person. The class, one is Xiti. Class
3 Person, not the main method, so can't direct execution, will be prompted to find the main method error; Xiti name is lower case, and the class name, so you will be prompted to find class, by the same token, the xiti. Class, too, the Java command don't need a suffix, so will be prompted to find classes, Java xiti can normal execution, is the information in the input code (only one line, and there is a space between Chinese and English)

1. The main ways to create a class does not necessarily have to
Another class to create a Person object, call the object zhang speakHello () method, which can be run directly within the code block, the method
Class I want to have no modifiers, I also am a beginner, I remember, there is no method body may not have a default public
2. The String [] args
  • Related