inotgo.com


Tool version compatibility problem
The definition of a variable is : An identifier used to name a data
Correct


The definition of a variable is : An identifier used to name a data
1949 This is a number , Represents a year

If you want to name this number , stay java It will be written in :

int year = 1949;

int Is the data type , Represents an integer
year Is an identifier
= Is the assignment operator
1949 Is a numeric value
; Indicates that the line ends

year This identifier is a variable , It stands for 1949 This value
public class HelloWorld { public static void main(String[] args) { int year = 1949; } }
public class HelloWorld {
	public static void main(String[] args) {
		int year = 1949;
	}
}


The official account of programming , Follow and get the latest tutorials and promotions in real time , thank you .


Q & A area    
2021-09-22 string Reference type
Boss Li of China Western Airlines

String Is a string reference type ? What exactly is a reference type ? What are the characteristics and application characteristics ?




2 One answer

javacint
Answer time :2021-10-15
Java Four reference types are supported in . Usually we may only use one of them , However, it is necessary to have a certain understanding of various reference types . This paper aims at the meaning and characteristics of four reference types 、 Application scenario 、 Use the method to analyze . Strong reference : Meaning characteristics Application scenario Mode of use Soft reference : Meaning characteristics Application scenario Mode of use Weak reference : Meaning characteristics Application scenario Mode of use Virtual reference : Meaning characteristics Application scenario Mode of use

The lights are luxuriant
Answer time :2021-09-27
A reference data type can be an attribute of an object you define



The answer has been submitted successfully , Auditing . Please My answer Check the answer record at , thank you
answer Or code please Fill in at least one , If you have a problem , Please ask again , Otherwise, the webmaster may not see




2021-07-01 Why only the first output HelloWorld The code can output , In other .java The main class cannot be found or loaded ?
17366636817Yz

Cannot find or load main class




6 One answer

javacint
Answer time :2021-10-15
Please put the first line in the file "package A;" Comment out ;

yuanhuajasmin
Answer time :2021-09-07
1 2 3 4 5 6 7 8 package how2j.t3; public class bianliang { public static void main(String[] args) { System.out.println("HelloWorld"); } }

xjlJavaStudy
Answer time :2021-08-09
Your following sentence HelloWorld Not in main Inside the method

A small salted fish with double spelling
Answer time :2021-07-13
package how2j.t3; public class bianliang { public static void main(String[] args) { System.out.println("HelloWorld"); } System.out.println("HelloWorld");// The output statement has no available for execution main method , So the system prompts that the main method or class cannot be found }

123123zeng
Answer time :2021-07-12
You see if the code is main Inside the method

Dream rain
Answer time :2021-07-06
It depends on your other .java Is there a main method in the that can run



The answer has been submitted successfully , Auditing . Please My answer Check the answer record at , thank you
answer Or code please Fill in at least one , If you have a problem , Please ask again , Otherwise, the webmaster may not see




2020-09-24 hear nothing of string and int What does that mean and how to tell , Pure white
2020-03-13 Why can't you output your name ?
2020-02-25 int Location must be under class Can't it be in the method ?


Too many questions , Page rendering is too slow , To speed up rendering , Only a few questions are displayed on this page at most . also 4 Previous questions , please Click to view

Please... Before asking questions land
The question has been submitted successfully , Auditing . Please My question Check the question record at , thank you
about JAVA Basics - variable - What are variables Your questions

Try to provide Screenshot code and Abnormal information , Help to analyze and solve problems . You can also enter this station QQ Group communication : 496725845
Ask questions and try to provide complete code , Environment description , The more conducive to the recurrence of the problem , The faster your question can be answered .
Have questions about the code in the tutorial , Please provide which step , Which line is in doubt , This makes it easy to quickly locate the problem , Improve the speed at which questions are answered
In the thousands of questions that already exist , A considerable proportion , Because of the use of and webmaster Different versions of the development environment Resulting in , For example jdk, eclpise, idea, mysql,tomcat Wait, the version of the software is inconsistent .
Please use the same version as the webmaster , You can save yourself a lot of learning time . The webmaster sorted out the software versions used in teaching , It's all here , Convenient for everyone to download : /k/helloworld/helloworld-version/1718.html

Upload screenshot