You are on page 1of 2

Ramos Alexander Knives TVL-ICT 12-GRACIOUS

Week 2 PARTS OF JAVA PROGRAM


ACTIVITY 1
1 Semi-colon just as a period marks the end of a sentence, this symbol marks the end of a statement in Java.
2. Class this line marks the beginning of a class definition.
3. Comments can be used to explain Java code, and to make it more readable. It can also be used to prevent execution
when testing alternative code. : Single line of these start with two forward slashes (/).
4. System class is part of the Java API It has member objects and methods for performing system-level operations, such as
sending output to the console.
5. New Line (\n) is a sequence of characters that represents a special character. The backslash allows you to “escape” the
string’s literal interpretation.
6. Method can be thought of as a group of one or more programming statements that collectively has a name. You can
pass data known as parameters and perform actions known as functions.
7. Java API is a collection of pre-written classes and methods for performing specific operations.
8. String Literal in programming terms, are a group of characters inside the quotation marks.
9. Public a Java keyword and written in lowercase letters, known as an access specifier, and controls where the class may
e accessed from.
10. Case-Sensitive in Java programming means it regards uppercase letters as entirely different characters than their
lowercase counterparts.
11. Print is an object that is a member of the System class. It provides methods for sending output to the screen.
12. Output are methods that are members of the out object that performs writing characters on the screen.
ACTIVITY 2
1. What do we mean by Java is a case-sensitive language? Provide examples.
Java case-sensitive language is the uppercase or lowercase of letters in your Java program matter.
Ex. Computer and computer, the uppercase and lowercase are not the same.
2. What are comments and why are they important to programmers?
Comments are important to programmer to make easy for them to understand the intent and functionality of the program
3. What are two important points to know about classes?
Two importants to classes in java the class header which is the line and marks the beginning of a class definition .
4. What are special characters in Java and discuss its meaning?

special characters
display

\’ Single quotation
\” Double quotation
\\ Backslash
\t Tab
\b Backspace
\r Carriage return
\f Formfeed
\n newline
What are escape sequences in Java and discuss name common escape sequences?
\t insert tab
\n insert newline
\r insert carriage return
\’ insert single qoute
\” insert double qoute
\\ insert backslash

ACTIVITY 3

You might also like