Rahul Pawar

Ranch Hand
+ Follow
since Mar 13, 2001
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 Rahul Pawar

[Output will be not equal
bcoz when u use any method of string class , it's creates new string object and hence trim()will creat new string and hence results false condition
rahul
public class ObChk
{
public static void main(String[] args)
{
Ex e1=new Ex(1,2);
Ex e2=new Ex(1,2);
Ex e3=new Ex(4,5);
Ex e4;
e4=e2;
if (e1.equals(e2))
{
System.out.println("e1 and e2 Equal");
}

if (e1.equals(e3))
{
System.out.println("e1 and e3 Equal");
}
if (e2.equals(e4))
{
System.out.println("e2 and e4 Equal");
}
}
}

The above program outputs only
e2 and e4 are equal.
can u tell me y ?
thanks
hello friends ,
i am bit confused about the equals()method and how to use it and how does this and what actually it does with the object comparison
thanks in advance
Rahul
Thanks for ur reply
but will u please give me how instanceof operator works with the arrays .
thanks in advance
Rahul
hello friends ,
please can anybody tell me the significance of instanceof operator and how is it works ?
thanks in advance
Rahul
hi friends ,
i am confused with the statements.
in jls it is mentioned that decimal integer or factorial values give compile time error if the value is greater than the range
of data type but then
how come following program get compile without error
public class test {
public static void main(String args[])
{
int i = 1000000 ;
System.out.println(i*i);//here result is 1000000000000 which
which is out of integer range
}
}
rahul
class Q81{
public static void main(
String args[]){
System.out.print(
Double.isNaN(3.0%0));
System.out.print(" ");
System.out.println(
Double.isNaN(3.0/0));
}//end main()
}//end class definition
what is the output of above program and y ?
thanks
rahul
i don't know how associativity and precedence work .
please help me out ....
rahul
hi friends ,
This que . is from velumurugan's notes
public class hi {
public final static void main(String args[])
{
int i = 0 ;
i = i++;
i = i++;
i = i++;
System.out.println(i);
}
}
Output is 0 ;
can somebody tell me how ?
thanks in advance
rahul
Thanks cindy ,
thanks for ur kind responce
Rahul
hi fernando ,
i think sub3 should be legal .
sub4 is correct and sub5 is also legal .
bcoz as per rule overriding method can throw exceptions , those r thrown by overridden method or can throw exceptions those r subclass of the exception thrown by overridden method .this is true only for checked exceptions .
so as per rule sub4 is throwing an exception which is base class exception of amethod()which is illegal and sub5 is throwing an exception which is subclass of ioexception so legal .
only doubt is about sub3
actually sub3 should work .
so please check that out again .
bye rahul
hi friends ,
i have some doubts about associativity and precedence
can anybody clear my concepts ?
thanks in advance.
please if possible explain me with examples
rahul
Can we have static contructors or in short what r the possible modifiers for the constructors.
thanks in advance.
rahul
Thank u all for ur immediate reply
Hi Ronnie
u r correct
thanks