0% found this document useful (0 votes)
73 views

Run :thread Wait :object Notify :object Sleep :thread Start :thread Join :thread

The document discusses various Java concepts including threads, generics, collections, and methods. It provides code examples of run(), wait(), notify(), sleep(), start(), and join() methods for threads, a generic class with type bounds, definitions and characteristics of Map, Set, and List interfaces, and an update method that adjusts a quantity and returns the new value.

Uploaded by

javednjaved
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Run :thread Wait :object Notify :object Sleep :thread Start :thread Join :thread

The document discusses various Java concepts including threads, generics, collections, and methods. It provides code examples of run(), wait(), notify(), sleep(), start(), and join() methods for threads, a generic class with type bounds, definitions and characteristics of Map, Set, and List interfaces, and an update method that adjusts a quantity and returns the new value.

Uploaded by

javednjaved
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

<Question-151>

run() :Thread
wait() :Object
notify() :Object
sleep() :Thread
start() :Thread
join() :Thread

<Question-171>=<Question-52>

<Question-177>=<Question-42>

<Question-180>=<Question-91>
<Question-183>

while(scanner.hasNext()){
if(scanner.hasNextBoolean()){
System.out.println(scanner.nextBoolean())}
else scanner.next();
}
<Question-187>

public class MyInt implements Comparable{

public int compareTo(Object o){


MyInt i2=(MyInt)o;
return i-i2.i;
}
}
<Question-188>

Map defines the Method V get(Object key)


Set contains no pair of elements e1 and e2 , such that e1.equals(e2)
List allow access to elements by their integer index
Queue is designed for holding elements prior to processing

<Question-191>
public class GenericB<T extends Pet>{
public T foo;
public void setFoo(T foo){}
public T getFoo{return foo;}
}

<Question-200>

public int update(int quantity,int adjust){


quantity = quantity+adjust;
return quantity;
}
public void callUpdate(){
int quant=100;
quant=update(quant,320);
}
Nov 7
ashish
<Question-217>=<Question-123>

You might also like