Java basics -- day02, java -- day02
1. Integrated Development Tool IDEA
(1) IntelliJ IDEA: it is mainly used to support development tools in Java, Scala, Groovy, and other languages. It also supports mainstream technologies and frameworks, he is good at developing enterprise applications, mobile applications, and Web applications.
(2) JRebel: Native on IDEA does not support hot deployment. The best solution for IDEA hot deployment is to install the JRebel plug-in.
(3) Basic IDEA operations:
-- Create a Project (single module Project): File --> new --> Project, select Java Enterprise in the New Project window --> check Web Application (web Project) --> Next --> enter the module name --> Finish.
-- Project configuration (multi-module Project): File --> new --> Project. In the New Project window, select Empty Project --> Next --> Finish. Click Project Structure> JDK version> Module to add a Project Module> Artifacts to add a Web Application: exploded (output directory) and double-click the rightmost Module.
(4) Basic IDEA configuration: File --> Settings.... You can set themes, fonts, and plug-ins.
(5) IDEA shortcut:
-- Ctrl + Shift + Enter: the statement is complete.
-- Alt + Q. You can see the declaration of the current method.
-- Ctrl + P to display parameter information
-- Ctrl + Alt + V. You can introduce variables. For example, new String (); automatically imports variable definitions
-- Ctrl + Enter: import the package and automatically correct it.
-- Ctrl + Shift + Space to automatically complete the code
-- Ctrl + X: delete rows.
-- Ctrl + D: copy the row
-- Ctrl +/or Ctrl + Shift +/, comment (// or /**/)
2. Operators
(1) Operator: operators are the symbols used to operate constants and variables.
(2) expression: the expression that concatenates constants or variables with operators to sign the java syntax.
(3) arithmetic operations (* +,-, *,/, %, ++ ,--).
(4) operator (=, + =,-=, * =,/=, % = ).
(5) Relational operators (= ,! =,>, >=, <, <= ).
(6) logical operators (&, |, ^ ,!, &, | ).
(7) ternary operators (relational expressions )? True expression 1: false expression 2 ;).
3. keyboard entry
(1) Procedure for entering data on the keyboard:
-- A: import java. util. Imports the import package (place on the class definition;
-- B: Create the object consumer SC = new consumer (System. in );
-- C: int x = SC. nextInt (); String s = SC. next ();