Go:
1 2 3 4 R4R --->Java --->> SCJP1.5 Chapter08 --> Sun Java Certification
Page 1
Question:ArrayList
Post Your View
AnswersArray list is bassically give us a fast interation and fast rndom access.its a growable array .its a type of orderd collection but ot sorted.now its use a new RandomAccess interface—a marker interface. More --- >>
By:umang Date:13.03.09
Question:Cleaning Up Before Garbage Collection—the Finalize() Method
Post Your View
Answersjava provides us to some mechenism for the run some code just before our object is deleted by the garbage collector, whihc methos is use for that. thats name is finalize() method,its maily se for the all classes inherit from class Object.we have a main prob is that we may have gathered by now, we ca More --- >>
By:umang Date:14.03.09
Question:Collections
Post Your View
AnswersCollections is bassically a framework in the java programming language.the Collections Framework in the java.util package is loaded with interfaces and utilities. More --- >>
By:umang Date:13.03.09
Question:Forcing Garbage Collection
Post Your View
Answersfistly we would like to mentioned that contrary to this section’s title, garbage collection cannot be forced.When java provides some ,ethod that allow us to request that the JVM perform garbage collection, if we are about to perform some time-sensitive operations, we want to probably minimised to th More --- >>
By:umang Date:14.03.09
Question:Garbage Collection
Post Your View
AnswersGrbage Collection is bassicllay a State the behavior that is guaranteed by the system.Its mianly use for the Write code that explicitly makes objects eligible for garbage collection.
Recognize the point in a piece of source code at which an object becomes eligible for garbage collection. More --- >>
By:umang Date:14.03.09
Question:HashMap
Post Your View
AnswersHash map is basscially gives us a unsorted ans unordrd map.when we need to the map and i dnt wanan to the go in the order then hash map is the best way to go .HashMap allows one null key in a collection and multiple null values in a collection. More --- >>
By:umang Date:14.03.09
Question:HashSet
Post Your View
AnswersIts a bassically unsorted , its also unorderd set.It mainy use for inserting the object of hashcode, so the more efficient our hashCode() implementation the better access performance we’ll get. More --- >>
By:umang Date:13.03.09
Question:Hashtable
Post Your View
AnswersHash Tables i sbassiclaly like a vector .its in the java from prehistorical time.Vector is a synchronized counterpart to the sleeker, more modern ArrayList, Hashtable is the synchronized counterpart to HashMap.Hashtable doesn’t let us have anything that’s null. More --- >>
By:umang Date:14.03.09
Question:How Does the Garbage Collector Work?
Post Your View
AnswersWe cant say surly when its work.We know that garbage collector usses a mark and sweep algorithm, When we are seeing about the java implemention its true but in the case of java speciafiacation we cant sure anut the java implemention.We also know that garbage collector uses reference counting;The imp More --- >>
By:umang Date:14.03.09
Question:Implementing an equals() Method
Post Your View
AnswersNow we would like to decide to override equals() in our class. It might look something like this :
public class EqualsProg {
public static void main (String [] args) {
Moof one = new Moof(8);
Moof two = new Moof(8);
if (one.equals(two)) {
System.out.println("one and two are equal");
}
}
}
More --- >>
By:umang Date:13.03.09
Question:Implementing hashCode()
Post Your View
AnswersNow we are discussing about the implementation of he hashcode().hash code () is simply use for the comparisaion. we haev a code for the hashCode().
class HasHash {
public int a;
HasHash(int xVal) {
a = aVal;
}
public boolean equals(Object o) {
HasHash h = (HasHash) o; // Don't try at home wit More --- >>
By:umang Date:13.03.09
Question:Isolating a Reference
Post Your View
Answersits a diff way for the objects can become eligible for garbage collection even if they still have valid references!.We also know that the islands of isolation.we have a code its very somple example for the call instance .......following here :
public class Island {
Island a;
public static vo More --- >>
By:umang Date:14.03.09
Go:
1 2 3 4
Contact Us
|