1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Applications and Applets
• Applications are normal programs.
• Applets run within a Web Browser
A First Java Application Program
• A user runs and interacts with a program.
• A package is a library of classes.
• A class contains methods.
• Every application has a main method.
• Objects perform actions when you call its methods.
• Variables store data.
• A data type specifies a set of values and their operations.
• A program gets, or reads, data from a user.
• Syntax is the set of grammatical rules for a language.
Writing, Compiling, and Running a Java Program
• You write a Java program.
• Each class is in a file whose name end in .java.
• You have to compile a Java program.
• Use the command javac to compile,
example: javac MyClass.java.
• Bytecode is in a file whose name ends in.class.
• Use the command java to execute,
example: java FirstProgram
Note: You write the class name, not the name of the file containing the class or its bytecode.