java que solution
java que solution
=>
1.Non-parameterized constructor
2.parameterized constructor
3.default constructor.
=>
2. WindowLinstener Interface
3.CompoentLinstener Interface.
g) What is exception?
=>An exception is an unwanted or unexpected event, which occurs during the
execution
of a program
i) What is Package?
• Packages are used in Java to avoid name conflicts and to control access of
class & interface
=>The new operator dynamically allocates the memory for the object
=>
=>
• The three common techniques for accepting input in Java are using
BufferedReader class, Scanner class and Command line arguments.
• An argument which is supplied/passed to the main() from the command line
at the time of calling the main() by the java interpreters is called command
line argument.
• Command line arguments are stored in the String[] args array passed to the
main method.
=>
• It provides the ability to add components like buttons, text fields, labels,
and other controls
1.setSize().
2.setVisible().
=>Method Overloading:
• Having multiple methods with the same name but different parameter lists
within the same class.
Method Overriding:
=>
1.public
2.private
3.protected.
c) Write a Java Program to copy the contents form one file into
another file. While copying, change the case of cell the alphabets &
replace all the digital by '*'.
AWT
Swing
• swing components are platform independent.
• Light weight
• More component
• Swing components require javax.swing package.
• Available
c) Write a Java program to accept n number from user & store only
perfect numbers into array & display that array.
=>
b) Define a class Emp with a member Eid and display() method, inherit
EmP class into the Emp Name class, Emp Name class having a member