Académique Documents
Professionnel Documents
Culture Documents
belongs. Constructor’s syntax does not include a return type, since constructors
never return a value.
Final keyword is used for define constant variables and method and no body can change that
variable and method within program.Final class cannot be extended. Final method cannot be
overriden and value of final variable cannot be changed
Native is a Java keyword that is used in method declarations to specify.... This keyword
signals to the Java compiler that the function is a native language
Default Constructor
An action event occurs, whenever an action is performed by the user. Examples: When the user
clicks a button, chooses a menu item, presses Enter in a text field. The result is that an
actionPerformed message is sent to all action listeners that are registered on the relevant
component.
Since the method in the child class has the same signature & name as the method of its parent
class, it is termed as overriding.
Package:
A Java package is a set of classes which are grouped together.
Every class is part of some package.
All classes in a file are part of the same package.
Java is a object oriented programming language which uses classes and methods.
A java class consists of methods and variables. Methods holds function of the class.
The String class provides two methods that allow you to search a string for a specified character
or substring: • indexOf( ) Searches for the first occurrence of a character or substring.
startsWith(String start):
This is a Boolean type method that returns either 'true' or 'false'. It checks the given
string that begins with specified string in the beginning. It takes a string type
parameter
There are 8 primitive data types: byte, short, int, long, float, double, boolean, char
any other data type in Java can be considered non primitive data type. String data type can also
be known as the primitive data type