Вы находитесь на странице: 1из 11

EOT Reviewer

Constructor
- is a special kind of subroutine in a class. It has the same name as the
name of the class and it has no return type, not even void.
- Is called with the new operator in order to create a new object. Its main
purpose is to initialize the newly created object, but in fact, it can do
anything that the programmer wants it to do.
Instance Variables and Instance Methods
- Are non-static variables and methods in a class
- Means that they do not belong to the class itself. Instead, they specify
what variables and methods are in an object that belongs to that class.
- That is, the class contains the source code that defines instance variable
and instance methods, but actual instance variable and instance methods
are contained in objects.
- Instance variables and instance methods are the data and behavior of
objects.
Encapsulation
- Is one of the fundamentals of OOP concepts. The other three are
inheritance, polymorphism and abstraction.
- A mechanism of wrapping the data and code acting on the data together
as a single unit.
- If a data member is private it means it can only be accessed within the
same class. No outside class can access private data member of other
classes.
Super Class and Sub Class
- The original class that is used to derive a new class is called a super class,
parent or base class
- The derived class is a subclass or a child class
Overloading
- If a class has a multiple methods by same name but different parameters,
it is known as method overloading.

System.in - used to read from the standard input.


InputStreamReader is a bridge from byte stream to character stream.
- read bytes and translate them into character according to
specified character encoding.
BufferedReader read text from a character input stream, buffering characters so
as to provide for the efficient reading of characters, arrays and lines
close() closes the scanner/buffer
IO Exception - Is a class Exception that was raised due to all input/output
contingencies. It may not read, write or close properly.
readline()- method reads a line of text and then return as String data type.
FileReader creates a Reader that you can use to read the contents of a file
newLine() used to display Strings in the next line
write() used to write on a specified file and it will be overwritten the existing content
of the file
append() used to add sentences, instead of overwriting it.
import java.util.*; - Package java.util. Contains the collections framework, legacy
collection classes, event model, date and time facilities, internationalization, and
miscellaneous utility classes (a string tokenizer, a random-number generator, and a
bit array).
import java.util.Arrays; - class is basically a set of static methods that are all useful
for working with arrays.
sort() method of array that has the ability to rearrange the contents of array
elements alphabetically or numerically.
import java.util.Calendar; abstract class that provides methods for converting
between a specific instant in time and a set of calendar fields such
as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the
calendar fields, such as getting the date of the next week.
getInstance();Gets a calendar using the default time zone and locale.
getTime();Returns a Date object representing this Calendar's time value
Calendar.Month Field number for get and set indicating the day of the month
Calendar.Year Field number for get and set indicating the day number within the
current year.
Calendar.Week Field number for get and set indicating the day of the week.
Calendar.Hour Field number for get and set indicating the hour of the day.
Calendar.AM_PM Field number for get and set indicating whether the HOUR is before
or after noon.
Calendar.Minute Field number for get and set indicating the minute within the hour.
Calendar.Second Field number for get and set indicating the second within the
minute.
Import.java.text.*; classes that provides useful classes for formatting numbers,
dates and times.
NumberFormat - focuses on formatting numerical values for output, adding
commas, currencies and percentages.
getNumberInstance- for group separators
getCurrencyInstance for currency signs
getPercentageInstance for percentage signs
SimpleDateFormat format dates and times
Import java.math.*;

bigDecimal - class provides operations for arithmetic, scale manipulation, rounding,


comparison, hashing, and format conversion.
- Used to avoid errors in floating-point arithmetic
Add() used to add two big numbers
Multiply()- used to multiply two big numbers

Вам также может понравиться