You are on page 1of 3

1. What are the basic operators in java?

• Arithmetic Operators.
• Relational Operators.
• Logical Operators.
• Assignment Operators.
• Increment and Decrement Operators
2. What are the use of the conditional statements?
• Conditional statements are used in a variety of programming languages to tell the computer what to do
when certain circumstances are met. Depending on the functions the programmer has in mind, these
judgments are performed if and only if the pre-stated conditions are either true or untrue.
3. Sample program using operators
• Arithmetic Operator

Output

• Relational Operator

Output
• Logical Operators

Output

4. Sample program using conditional statements


• Output



• Output


5. What is the basic syntax in Javas.
• The fundamental rules of a computer language are represented by basic syntax. It is impossible to
build working code without these guidelines. Every language has its own set of rules that form the
foundation of its grammar. Language-specific naming rules are an important part of fundamental
syntactic norms.

You might also like