Lkol
NAME =/= name BE CORRENT!! - Reserved words in JAVA if, for, while, do, while, class ........... YOU CAN’T DECLARE VARIABLE WITH THESE WORDS 2 DATA (VARIABLE) Data is made ofvariable and type - variable is the name of the data (box where you store the data) Variable = value example: president = "obama" (string (MORE THAN ONE CHARACTER- NO PRIMITIVE) - word in java) Age = 49(integer type - number without decimals) type of data: different kind of data 3 DATA (TYPE) Variable is designed to hold one type of data ( number, word.......) variable has a type (data formart) Injava, 8 primitive types: - byte (O OR 1) - short ( -16XXX -> 16XXX) - int ( -32XXX -> 32XXX) - long (-66XXX -> 66XXX) - float ( 7 NUM IN THE DECIMAL PART) - double ( 15 NUM IN THE DECIMAL PART) - char -Boolean
=> INTEGERS NUMBERS
=> DECIMAL POINT NUMBERS
=> SINGLE CHARACTER (ONE WORD) => TRUE OR FALSE
4) VARIABLE IN THE PROGRAM variable_type + variable_name example: int number ; floatpriceOfCar ; (the first word in lower case and the others beguin with uper case) char c ; 5 SUBROUTINE - To display information of the user: output("Hello") ; output("Your name is" + name) ;...
Regístrate para leer el documento completo.