Today task:
Test:
- Create a class 'Employee'
- Have main method in it.
- Inside main method, create an object.
- Using this object, call method called 'develop'.
- using this object, call method called 'work(10)'
- Define appropriate methods develop() and work(int no)
- From work method, return no * 10
- Store the returned value as 'output' in main method.
- Print the 'output'.
10) What is Object? How do you create Object in Java?
11) What is method? How do you create Method in Java?
12) Why do we need static keyword in Java?
13) Write few Java Keywords you know.
PROGRAM:
OUTPUT:
Top comments (0)