venkat ramana

Greenhorn
+ Follow
since Dec 15, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by venkat ramana

Hi,

I want to get the resources or contact one servletcontext to another servlet context in the same jvm or another jvm. how can contact this?
If any one know about this plz explain me
17 years ago
Hi,
i am not usning Ejb, but i don't know how can i get a transcation obj in normal jsp page.
can anybody help me?
18 years ago
JSP
HI,
can u anybody explain what is the drawback of "new" key word?
Let me know
String s ="hello";
In this statement The reference s wherer it is sorted? that means stack,heap or StringPool
String s = new String("hello");
in this statement the reference 's' where it is stored?
Let me know
GC
I have a code

class C13
{
public static void main(String[] args)
{
C13 c1 = new C13();
C13 c2 = m(c1);
C13 c3 = new C13();
c2 = c3; // line 1

// here code is there
}
static C13 m(C13 obj)
{
obj = new C13();
return obj;
}
}
After line 1 how many obj are eligible to GC ?
Can You please explain ?
I have a code

class Int
{
public static void main(String[] args)
{
a(Integer.MAX_VALUE , Integer.MAX_VALUE);
}
staticvoid a(double a , float b)
{
if( a == b)
System.out.println("equal");
else
System.out.println("not equal");
}
}

This is gives "not equal"

This is only for Integer.
But if you use Byte,Short, Long, Float it gives "equal"
Let me know what is the behind reason
String s ="hai";

In this line how many objects are created?
I think 2 obj, one is 's' and another is 'hai'


String s = String("hai");

and this statement also 2 obj are created
Let me know am i right or not?
I have a pice of code:

class StringExample
{
public static void main(String[] args)
{
String s ="Hello";
String t = s.toLowerCase();
String u = s.toLowerCase();
if( t == u)
System.out.println("equals");
else
System.out.println("false");
}
}
In this code string obj 't' and 'u' are created using 's' obj
but it prints false
i can't under stand why like that?
I think toLowerCase() gives every time a new obj? am i right?
let me know?
if you send -ve parameter in abs() it gives +ve value
but
Math.abs(Integer.MIN_VALUE) & Math.abs(Long.MIN_VALUE)
gives -ve value
i don't how it is given like that

Can u plz explain?
Class A
{
public static void main(String [] args){
String s = null;


}
}


In this statement Object 's' is created or eligible for garbage collection?