1. Purpose
- Identify the basic parts of the Java program
- Distinguishing which is included in Java literals, basic data types, variable types, and operator identification.
- Develop a simple Java program using the concept of learning in this chapter.
- Analyze first java program
2. Background
In this section, we will discuss about the basic parts of Java programming. We'll start by trying to explain the basis of Hello.java programs that have been introduced in the previous chapter. We will also discuss some guidelines for how to write a script or code writing instructions in writing programs more effective and easier to read.
Experiment 1 Displaying Variable Data:
Output:
Experiment 2 Using Arithmetic Operators:
Output:
Experiment 4 The use of logic and Boolean(AND) Operators:
Experiment 5 Using Logical Operators and Boolean OR:
Output:
Experiment 6 Using Logic exclusive OR operator:
Output:
Experiment 7 Using Logical NOT Operator:
Output:
Experiment 8 The use of condition operator (? :):
Example 1:
Output:
Example 2:
Output:
good article, thanks
ReplyDeletenice share
ReplyDelete