
Patrick B. answered 03/14/21
Math and computer tutor/teacher
(I)
1) Program created in a text editor or IDE
integrated development environment which
contains the compiler and JVM
2) the program is then compiled either at
the DOS command prompt using the command javac,
or via the menus in the IDE
3) the program can then be run either at
the DOS command prompt using the command java,
or via the menus in the IDE
(II)
java must be installed as well as the IDE if used
(III) NetBeans is a particular type of IDE that
allows the development and creation of various
type of java applications: stand-alone, console apps,
windows apps, web apps, servlets, etc
(IV) local variable is declared INSIDE the function
instance variable is declared via the NEW command
to declare an Instance of an object of some particular class
static variable CANNOT be changed
(V) see the sample program which illustrates the declaration of
variables of different types and kinds
(VI) expression contains variables, numbers, and operators
(VII) statement is an exectuable line of code that ends with
semicolon;
class LyncyM
{
public static void main(String args[])
{
int iIntvar = 12;
long longIntNum = 54321;
float flAmt = 333.33f;
double flDblAmt = 3.1415925;
String str="HELLO";
// this is a one line commnet
/*****************
this is a multi-line comment
*************************************/
/*******************
operators: add +, subtract -, multiply *, divide /,
mod %, increment by 1 ++, decrement by 1 --
comparison operators: equal ==, not equal !=,
greater >, less <,
greater or equal >=,
less or equal <=
**************************/
// expression contains numbers, variables, operators
System.out.println(iIntvar);
System.out.println(longIntNum);
System.out.println(flAmt);
System.out.println(flDblAmt);
System.out.println(str);
}
}