Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

JAVA Programming :: Objects and Classes

Home > JAVA Programming > Objects and Classes > General Questions

1. Which statement is true?

Answer: An abstract class can be extended by a concrete class.

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

2. Which declaration of the main method below would allow a class to be started as a standalone program. Select the one correct answer.

Answer: public static void main(String args[])

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

3. If we do
ArrayList lst = new ArrayList();
What is the initial capacity of the ArrayList lst ?

Answer: 10

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

5. To make a variable defined in a class accessible only to methods defined in the classes in same package, which of the following keyword should be used. Select the one correct answer.

Answer: The variable should not be preceded by any of the above mentioned keywords.

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

6. Which is a valid definition of an interface called Transportable given another valid interface, Movable?

Answer: interface Transportable extends Movable { /**/ }

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

7. Which statement is true?

Answer: An abstract class can be extended by a concrete class.

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

8. Which of the following modifier cannot be applied to the declaration of a field (Member of a class)?

Answer: abstract

Explanation:

abstract

Workspace

Tags:

No Tags on this question yet!

9. A programmer is designing a class to encapsulate the information about an inventory item.
A JavaBeans component is needed to do this.
The InventoryItem class has private instance variables to store the item information :
private int itemId;
Which method signature follows the JavaBeans naming standards for modifying the itemId instance variable ?

Answer: setItemId(int itemId)

Explanation:

setItemId(int itemId)

Workspace

Tags:

No Tags on this question yet!