This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Questions  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i had a few questions please answer it with little

bit of explanation

Which most closely matches a description of a Java

Map?
---------------------------------------------
1) A vector of arrays for a 2D geographic

representation
2) A class for containing unique array elements
3) A class for containing unique vector elements
4) An interface that ensures that implementing

classes cannot contain duplicate keys

---------------------------------------------

What can cause a thread to stop executing?

1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class?

i didn't what stop means here.whether pushing the

thread to the dead state or to waiting mode.
---------------------------------------------
anonymous class will extend or not

---------------------------------------------
what the instanceof operator meant for

The instanceof operator can be used to determine

if a reference is an instance of a particular

primitive wrapper class


i had seen the above answer in mock exam

i doubt it.is instanceof is meant only for wrapper

class.
---------------------------------------------

Significance transient and volatile are Java
modifiers

---------------------------------------------

Say yes or no

Final Modifier+class----->Can't extended.
Final Modifier+Method----->Can't overridden.

---------------------------------------------

any way to find the length of the string like that

of array

---------------------------------------------
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Which most closely matches a description of a Java
Map?
---------------------------------------------
1) A vector of arrays for a 2D geographic
representation
2) A class for containing unique array elements
3) A class for containing unique vector elements
4) An interface that ensures that implementing
classes cannot contain duplicate keys

---------------------------------------------




The answer is 4 . check the API .
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any way to find the length of the string like that
of array


Try this :

String s = "aaa";
s.length();
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say yes or no

Final Modifier+class----->Can't extended.
Final Modifier+Method----->Can't overridden.

yes , one more in addition ,

Final Modifier + variable ----> can't reinitialized
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what the instanceof operator meant for

The instanceof operator can be used to determine

if a reference is an instance of a particular

primitive wrapper class


i had seen the above answer in mock exam

i doubt it.is instanceof is meant only for wrapper

class.


Yes , you are right .

instanceof can be used for any class .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!