Anupama Kota

Greenhorn
+ Follow
since May 21, 2001
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 Anupama Kota

Hi
Amith
B has its own constructor explicitly na .so why it call A constructor implicitly.i am confusing in this point only .pl clear me.
public class Myclass
{
public static void main(String args[])
{
B b = new B("Test");
}
}
Class A
{
A()
{
this("1","2");
}
A(String s,String t)
{
this(s+t);
}
A(String s)
{
System.out.println(s);
}
}
class B extends A
{
B(String s)
{
System.out.println(s);
}
B( String s,String t)
{
this(s+t+"3");
}
B()
{
super("4");
}
}
In text it gives output 12 followed by Test.But i cant understand why it is printing like that???Pl clear me.
Hi
Is one class Difines more than one Constructors?
When called with new operator which constructor is called?
If more then one constuctors r difined what r the use of difining more than one?
Hi
Rajan && Steven
Thanks for clear my doubt.

Hi
public void methodA (int a,double b){} //1
public int methodA (int a,double b) {} //2


It has the diffrent return types na so why this is not O.K.(Find in Mughals Pg 100)for Method overloading.Is it for only same name and different parameters?
Pl clear my doubt.
Hi
Junilu
Yes,I understand how to convert both binary to hex,oct and vice versa,1's and 2's complement.But if this type of question come in Exam then what we have to do.
We have to know na about ")" that character is represented as decimal 41 .How we know this??
If mine thinking is wrong pl correct me.
Hi
char v1 = ')';//41
byte v2 = 13;

~v1 = -42;
v1&v2 = 9;
v1|v2 =45;

I know the process that the value is coveted to binary and then operate both regarding to the operator.
But in the exam it is time taken process.That we have to rember all Ascii values.May be some times it goes worng in recollecting.
Is there any other simple way like 12>>2 is 12 / (2(power)2)??
Hi
Neeraj
Yes,I came to know that if it is not initialized in method it give Compiler Error "Variable may not have been intialized"
Thank U
Hi
Junilu
Public class member
{
boolean b1;
}
other
boolean b2;

So,b1 is automatically initialized,but b2 is not we have to explicitly initialize for it.
But i found in Mughals Pg.62 no initialization, it is false.It is not a mamber variable.
So that only i got doubt that why initialization required.Pl clear my doubt?
Hi Haining
yes,u r right that i found in Mughals now in pg 53.
Thank U .
Hi
Upto now i am thinking that
boolean b1;
boolean b2 = false;
Actually both r resulting the same value na.i.e.,initially boolean value is false.So why we r initialiging false.(I found in Mughals)
Is there any thing wrong then pl correct me.
Hi Samith
Now i understand the difference.Thank U.
Hi Lusha
Thanks for clearing my doubt
Hi prakshi
I don't understand range,Is it -2 (power)15 to +2 (power)15 - 1 then 42 is in the range na!! If 42 is not in the range then what is the Ex. short.Please provide the Ex. of short.
Hi Tod
B4 Ur answer i understand that B'coz of int is 4 bytes and short is 2 bytes so that it does't fit.So for this cast is needed.
like h = short (h+2);
But I didn't understand Ur 3) point.pl explain me.