Java Reference
In-Depth Information
Invalid vote: 8
Invalid vote: 9
Number of voters: 30
Number of valid votes: 28
Number of spoilt votes: 2
Candidate Score
Avasa Tawari 6
Saskia Kalicharan 6
Nirvan Singh 4
Torrique Granger 4
Dawren Greenidge 3
Jordon Cato 3
Denise Duncan 2
The winner(s)
Avasa Tawari
Saskia Kalicharan
eXerCISeS 2
1.
What is meant by the state of an object? What determines the state of an object?
2.
distinguish between a class and an object.
3.
distinguish between a class variable and an instance variable.
4.
distinguish between a class method and an instance method.
5.
distinguish between a public variable and a private variable.
6.
explain what happens when the statement String S = new String("Hi") is executed.
7.
to what values are instance fields initialized when an object is created?
8.
What is a no-arg constructor? how does it become available to a class?
9.
You have written a constructor for a class. What do you need to do to use the no-arg
constructor?
10. What is meant by the term data encapsulation ?
11. “an object variable does not hold an object.” explain.
12. explain the role of the toString() method in java.
13. Write a program to read names and phone numbers into an array of objects. request a name
and print the person's phone number.
Search WWH ::




Custom Search