logical operators
&: With, and have common, must conditions are satisfied is true
False is returned with false and must be true to return true
|: Or, if one of them satisfies the condition, it returns true.
^ also or, the same is false, different is true
&& Short circuit with, if false on the left side returns false, if all is true go down.
|| : Short circuit or, if true on the left, returns true
Java Reference Data types
use of reference data types Unlike defining basic data type variables, variable definitions and assignments of reference data types have a relatively fixed step or format.
Data Type variable name = new data type ();
Each reference data type has its function, and we can invoke the functionality of the instance of that type.
The variable name . Method Name ();
Scanner type accept input command, user keyboard input to get data entered
First import package Improt Java.util.Scanner;
Create an object instance Scanner sc = new Scanner (system.in);
Call method: int i = Sc.nextint () accepts an integer type entered in the console and assigns a value to I
Stochastic type random number class
First import package Improt java.util.Random;
Create an object instance random ran = new random ();
Call method: int i = Ran.nextint (10) The random number is assigned to I, inclusion 0 but does not cover 10, 0-9 of the range. Can (10) +1 is the range of 1-9
System.out.print (i) random number per output
Java Basic Syntax 3