Professional Documents
Culture Documents
isolating functions to individual objects. And the methods within the class can only be called by objects
crated from the class. While methods are designed to isolate data, they can still be used to return values
to other classes if necessary. If a value needs to be shared with another class, the return statement can
be used.
Method overloading is the use of two or more method in a class that have the same name but
different parameters, if two or more method have the same name and same parameter list but differs in
return type are not overloaded method.
java.text.DecimalFormat; – used to format the numbered output value’s decimal format of a program.
java.util.Scanner; – a predefined method that is used to input a value of what is being asked
javax.swing.JOptionPane; – same as the scanner method, it is used to input a value but on a pop-up
window and show the output on a pop-up window.