0% found this document useful (0 votes)
172 views

Programming 1 Reviewer

The document discusses Java operators, control structures, classes, objects and methods. It defines operators as symbols that perform operations on operands and return results. It describes different types of operators such as arithmetic, logical, assignment and more. It also explains control structures like conditional branches, loops and branching statements that alter program flow. The document outlines the basics of classes and objects in Java, including fields, methods, constructors and access modifiers. It provides details on defining and calling methods, including naming conventions, parameters, return types and more.

Uploaded by

Monica May
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
172 views

Programming 1 Reviewer

The document discusses Java operators, control structures, classes, objects and methods. It defines operators as symbols that perform operations on operands and return results. It describes different types of operators such as arithmetic, logical, assignment and more. It also explains control structures like conditional branches, loops and branching statements that alter program flow. The document outlines the basics of classes and objects in Java, including fields, methods, constructors and access modifiers. It provides details on defining and calling methods, including naming conventions, parameters, return types and more.

Uploaded by

Monica May
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

BSIT 1G PROGRAMMING REVIEWER

Java operators - Value the importance of using the different types of operation symbols into the
correct types of operators to properly run the program Demonstrate the correct using of Java
operators.

Operators are special symbols that perform specific operations on one, two, or three operands,
and then return a result.

Java Operators - are symbols that used to perform operations. There are many types of
operators in Java which are the same with C++. If you have already been through C++
programming those operators have the same format and uses.

Arithmetic Operator - used to perform addition, subtraction, multiplication, and division. They
act as basic mathematical operations.

Comparison Operator - tests or defines some kind of relation between two entities.

Bitwise Operator - it is used to perform binary logic with the bits of an integer or long integer.

Logical Operator - used to determine the logic between variables or values.

Assignment Operator - it is used to assign the value on its right to the operand on its left.

Miscellaneous Operator - Java's miscellaneous operators are: ternary operator, member access,
comma, array index, new, instanceof, and typecast.

Arithmetic Operators - These operators involve the mathematical operators that can be used to
perform various simple or advance arithmetic operations on the primitive data types referred to
as the operands. These operators consist of various unary and binary operators that can be
applied on a single or two operands respectively.

Simple Assignment Operator - It used with the “=” sign where the left side consists of the
operand and the right side consists of a value. The value of the right side must be of the same
data type that has been defined in the left side.

Compound Assignment Operator - It is also known as Shorthand Assignment Operators. It is


called shorthand because it provides a short way to assign an expression to a variable. This
operator can be used to connect Arithmetic operator with an Assignment operator.
BSIT 1G PROGRAMMING REVIEWER

The following are the list of compound assignment operators:


• += Compound additional assignment operator
• -= Compound subtraction assignment operator
• *= Compound multiplication assignment operator
• /= Compound division assignment operator

Program - is a list of instructions.

Control Structures - In java, it is a statement that determines whether the other statements will
be executed or not. It controls the flow of a program. Are programming blocks that can change
the path we take through those instructions.

Term Statement - it can simply be defined as an instruction given to the computer to perform
specific operations.

Three kinds of control structures:

Conditional Branches - which we use for choosing between two or more paths.

Types in Java:
 if else/if-else-if
 ternary operator
 switch

Loops - are used to iterate through multiple values/objects and repeatedly run specific code
blocks.

Types in Java:
 for
 while
 do while

Branching Statements - which are used to alter the flow of control in loops.

Types in Java:
 break
 continue
BSIT 1G PROGRAMMING REVIEWER

Conditional Branches

If else Statement - It is the most basic of control structures but can also be considered the very
basis of decision making in programming. In this statement, if the condition specified is true, the
if block is executed. Otherwise, the else block is executed.

In Java, we have an if...else...if ladder that can be used to execute one block of code among
multiple other blocks.

Switch - If we have multiple cases to choose from, we can use a switch statement. Three or more
if/else statements can be hard to read. As one of the possible workarounds, we can use switch.

Continue - Simply put a continue means to skip the rest of the loop we're in.

Java - is an object-oriented programming language, we need to design our program using objects
and classes. Every class in Java is directly or indirectly derived from the object class.

Object class methods - are available to all Java classes.

Object - A basic unit of Object-Oriented Programming and represents the real-life entities. A
typical Java program creates many objects, which as you know, interact by invoking methods.

Identity: It gives a unique name to an object and enables one object to interact with other objects.

State:
• It is represented by attributes of an object.
• It also reflects the properties of an object.
Behavior:
• It is represented by methods of an object.
• It also reflects the response of an object with other objects.

Software development - methods operate on the internal state of an object and the object-to-
object communication is done via methods.

Class - A user defined blueprint or prototype from which objects are created. It represents the set
of properties or methods that are common to all objects of one type.
BSIT 1G PROGRAMMING REVIEWER

Modifiers - A class can be public or has default access

Class name - The name should begin with an initial letter


Body - The class body surrounded by braces, {}.

Constructors - It used for initializing new objects.

Fields - are variables that provide the state of the class, its objects and methods.

Methods - are used to implement the behavior of the class and its objects.

Local variables - It defined inside methods, constructors or blocks. It will be declared and
initialized within the method and the variable will be destroyed when the method has completed.

Instance variables - This is within a class but outside any method. These variables are
initialized when the class is instantiated. It can be accessed from inside any method, constructor
or blocks of that particular class.

Class/Static variables - It declared within a class, outside any method, with the static keyword.

Familiarize in Java methods;

• Evaluate the significant of properly naming a method in Java to explicitly run the program;

• Illustrate the use of general declaration components of a method in Java program.

Method is a list of things to do. Every method has a name and you tell the computer to do the
things in the list by using the method’s name in your program.

Java is a general-purpose programming language and you need a function to perform desired
operations on the applications.

These functions are generally referred to as methods. In this lesson, you will learn how exactly
methods in Java work.

Java Method
 A collection of statements that perform some specific task and return the result to the
caller.
BSIT 1G PROGRAMMING REVIEWER

 It can perform some specific task and allow us to reuse the code without retyping the
code.
 It used to perform certain actions and they are also known as functions.

Method Declaration
Modifier – it defines access type of the method from where it can be accessed in your
application.

In Java, there are four types of the access specifiers.


Public - It accessible in all class in your application.

Protected - It accessible within the class in which it is defined and, in its subclass, (es).

Private - It accessible only within the class in which it is defined.

Default (declared/defined without using any modifier): accessible within same class and package
within which its class is defined.

Return type - the data type of the value returned by the method or void if does not return a
value.

Method Name - the rules for field names apply to method names as well but the convention is a
little different.

Parameter list - a comma separated list of the input parameters are defined that preceded with
their data type which within the enclosed parenthesis. If there are no parameters, you must use
empty parentheses ().

Exception list - the exceptions you expect by the method can throw and you can specify these
exception(s).

Method body - it is enclosed between braces. The code you need to be executed to perform your
intended operations.

Naming a Method
BSIT 1G PROGRAMMING REVIEWER

 A method name is typically a single word that should be a verb in lowercase or multi-
word that begins with a verb in lowercase followed by adjective, noun.
 After the first word, first letter of each word should be capitalized

Parameters - it refers to the list of variables in a method declaration.

Arguments - are the actual values that are passed in when the method is invoked.

Object – A basic unit of object programming and represents the real-life entities.

Field- the Variables that provide the state of the class. Its objects and methods.

Object- It is Created from a class.

Class Name- A name should begin with an initial letter capitalized by convention.

Instance Variable – This can be accessed from inside any method. Constructor or blocks that
particular class.

Class – It represents the set of properties or methods that are common to all objects of one type.

Body – It was surrounded by braces {}.

Object Class Method – It is available to all java Classes.

Constructors – it used for initializing new objects.

Class – A user defined blueprint or prototype from which objects are created.

Identity – It gives a unique name to an object.

Behavior- it is represented by methods of an object.

Java- An object-oriented programming language that need to design the program using objects
and classes.
BSIT 1G PROGRAMMING REVIEWER

Static Variable – This is declared within that outside any methods with the static keyword.

Modifiers – A Class can be public or has default access

Object – A typical Java program that creates many objects which interact by invoking methods.

Local Variable – it defined inside methods. Constructions or blocks.

Ternary Operator – A Control structure that is not always goods substitute for if/else statement
despite of great attributes.

Branching Statements- What kind of control structure that are used to alter the flow of control
in loops?

Loops – What kind of control structure is used to repeat the same code multiple times in
succession?

Loops- A control Structure that used to iterate through multiple values or objects and repeatedly
run specific code blocks.

Term Statement – It can simple be defined as an instruction given to the computer to perfrom
specific operations.

Switch – This is statement that used to have multiple cases to choose.

If else if statement – it is statement that can be used to execute one block of code among
multiple other blocks.

Program – it is a list of instructions.

If else statement – This is the most basic of control structures but can also be considered the
very basis of decision making in programming.

Conditional Branches – What kind of Control structures that can use for choosing between two
or more paths?
BSIT 1G PROGRAMMING REVIEWER

Term Statement – it can simple be defined as an instruction given to the computer to perform
specific operators.

Comparison operator – It is an operator that used to tests or defines some kind of relation
between two entities.

Arithmetic operator - An operator that act as basic mathematical operations.

Java Assignment Operator – This is commonly used to assign the value on its right to the
operand on its left.

C++ - What kind of programming language is almost looks the same as java operators?

Arithmetic Operator – This operator consists of various unary and binary operators.

Modulus – What kind of operators that’s is returning the division remainder?

Bitwise operator – It is an operator that used to perform binary logic with the bits of an integer
or long integer.

Simple Assignment Operator – An operator wherein the value of the right side must be of the
same data type that has been defined in the left side.

Operators – A Special symbols that perform specific operations on one, two or three operands
and then return a result.

Arithmetic operator – what kind of operator that involve a mathematical operator?

Java – It need to install on a single computer to be able to run the other applications and
websites.

NetBeans with bundled JDK – this will save you the time for installing the java JDK separately
and configuring the NetBeans.

NetBeans – it was known as IDE for Java.

// - A Comment that use for single or one statement.


BSIT 1G PROGRAMMING REVIEWER

Integrated Development Environment – What does IDE Stands for?

This-PC - in setting up the path for windows, on your windows 10 desktop what do you need to
right click in order to select the properties?

NetBeans IDE – It runs on operating systems that support the java VM like MS windows 10.

Navigator Window – A Window which you can use to quickly navigate between elements
within the selected class.

You might also like