Lkol

Páginas: 2 (363 palabras) Publicado: 5 de enero de 2013
Computer science L1P6 I Java Introduction 1) JAVA  High level programming language => high performance  Use to write/ develop computer apps with Java (software for computer, videogames, mobileapps….)  Java is very simple (free, easy to write an understand)  Java Is object oriented language. 2) CONCEPTS IN PROGRAMING (Down) 3) BASIC JAVA APP To develop Java programs we will use the software Netbeans:  to create a program  to create a java main app II VARIABLES AND PRIMITIVE TYPES 1 FUNDAMENTALS VARIABLES (NAMING RULES) Variable are used in a program to refer to different things but youhave to respect some rules of Syntax when you use the variables. - No spaces allowed in a variable n 1 - n 2 => NO name1 - name2 => YES name 1 - name 2 => NO - Java is making a difference btw UPPERCASE and lower case

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) ;...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • lkol
  • lkolo
  • lkol

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS