arjun


{ City } visakhapatnam
< Country > india
* Profession * student
User No # 45006
Total Questions Posted # 2
Total Answers Posted # 8

Total Answers Posted for My Questions # 6
Total Views for My Questions # 21166

Users Marked my Answers as Correct # 30
Users Marked my Answers as Wrong # 39
Questions / { arjun }
Questions Answers Category Views Company eMail

what are upcasting and downcasting?

5 Core Java 16900

Why ArrayList class is not a synchronized class and why it is not a thread safe class? explain

1 Core Java 4266




Answers / { arjun }

Question { Wipro, 14057 }

can we write a program with out a class in core java?


Answer

Noo way, every program should be write within class only

Is This Answer Correct ?    0 Yes 3 No

Question { C DAC, 10283 }

what is difference between vector and arraylist?.


Answer

If we want to arrange a collection of objects into an other object then we will use either ArrayList or Vector. When we use these classes all the objects that are placed in it will be stored sequentially one after the other.

ArrayList : If we want to store same type of objects then we will use ArrayList class.

Vector : If we want to store different type of objects then we will use Vector class.

Is This Answer Correct ?    1 Yes 3 No


Question { IBM, 25326 }

what is mutability?which one is mutable String or StringBuffer?and why?give
examples of each which shows the mutability of each String or StringBuffer


Answer

Mutability means data which we can change.
StringBuffer class is mutable, because it can change its
data where as String class cant.
Example:
If you want to combine two strings we have two methods i.e
append() method and concat() method.
here append() is used to append the 2nd string to 1st string
and it can store in memory. where as concat() method is
combine the 2nd string to 1st string but it is not actuly
stored in memory it just show to us as combind

Is This Answer Correct ?    4 Yes 4 No

Question { Accenture, 8503 }

System.out.println(101/14)
what is the output?
a)6
b)14
c)7.14
d)0


Answer

There should be a semicolon(;)at ending of the code...
i.e
System.out.println(101/14);

Then ans wil b 7 only

Is This Answer Correct ?    9 Yes 1 No

Question { CTS, 42483 }

Can i have abstract class with no abstract methods?


Answer

The class Abstract is defined as are used to declare common
characteristics of subclasses. It is used to provide a
template for concrete subclasses down the inheritance tree.
so we can't have abstract class with no abstract method

Is This Answer Correct ?    6 Yes 24 No

Question { TCS, 7786 }

explain Anonynous inner class?


Answer

It is a class without any name. It is used when we want to
have an encapsulation(i.e. want to use an object of a class)
only once and never required again. we combine the object
creation and class code in a interesting way.

Is This Answer Correct ?    5 Yes 1 No

Question { 15566 }

which of tha following is not a thread safe class?
a) ArrayList b)Vector c)HashTable d)None


Answer

Hey Guys n girls...
If you know the Answer Exactly den only post it, V dont want
Guess Answers as wel as Funny Ans, this is the site for not
fun, got it.

Is This Answer Correct ?    5 Yes 2 No

Question { 15566 }

which of tha following is not a thread safe class?
a) ArrayList b)Vector c)HashTable d)None


Answer

Mr Anonymous, check the answers above who has given all
options as ansewers. Is it rite for u??

Is This Answer Correct ?    0 Yes 1 No