Tamanna Mittal

Greenhorn
+ Follow
since Jun 03, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tamanna Mittal

Thanks percy.
23 years ago
I cleared the exam on 31st with 72% marks.the paper was not bad and not very difficult at all. but i got excted and messed it up. But i guess better luck next time. Thanks guys for helping me. I really like this forum.
23 years ago
Thanks pal.
------------------
Cheers
Tamanna :-)
good luck and wish the same for me.
------------------
Cheers
Tamanna :-)
Hi Rashmi,
I very well got the constructor's concept. But the method thing is still not clear.
this statement
Process p = new InheritanceTest();
will initialize the variable p to type derived class
in derive class there is a method

char InheritanceTest(char c) {
c='V';
return (char)c;
}

then y would the char will implicitely convert to int and hence will call the method of the base class. Rest all the code i am clear with but this is the only part i am not clear with. Please help.
Please explain about the output.
class InheritanceTest extends Process {
int x=18;
public static void main(String [] args) {
Process p = new InheritanceTest();
System.out.println(p.InheritanceTest('R'));
System.out.println(p.x);
}
InheritanceTest() {
System.out.println(true ^ true);
}
InheritanceTest(char c) {
System.out.println(c);
}
char InheritanceTest(char c) {
c='V';
return (char)c;
}
}
class Process {
int x=9;
Process() {
System.out.println("Starting Process...");
}
char InheritanceTest(int i) {
i='S';
return (char)i;
}
}
Options are:
What is the Output?
1.Prints Starting Process �, false, �S� and 18
2.Prints false, �V� and 9
3.Prints true, �V� and 9
4.Prints Starting Process � , true, �V� and 9
5.Prints Starting Process �, false, �V� and 9
6.Prints Starting Process �, false, �V� and 18
7.Prints Starting Process �, false, �S� and 9
8.Prints Starting Process �, true, �R�, and 18
9.Prints Starting Process �, true, �V� and 18
And correct option is 7. but y?


------------------
Cheers
Tamanna :-)
ThankX buddy. I got it.
------------------
Cheers
Tamanna :-)
Can some one please gimme the url for MindQ questions? I'm not able to find that on net. Please help me guys.
Thanks in advance.
my mail id: [email protected]
------------------
Cheers
Tamanna :-)
But in this case the other class is not being derived from the base class so Y giving error.
------------------
Cheers
Tamanna :-)
ThankX buddy
------------------
Cheers
Tamanna :-)
I am in chicago want to buy coupon for this certification exam. Do i need to call the 800 sun no. or is there any site from where i can buy this coupon? Please help me guys. I wanna give this exam as early as possible.
------------------
Cheers
Tamanna :-)
i think u r right the answer should be 5. Can some one please explain this?
------------------
Cheers
Tamanna :-)
Yup!
I have tried the 27th link. hey r ok types but bit tricky. And bout the 5th link it is already stating that "harder then the actual exam" so y do u worry out that. just keep practing and that is it.
------------------
Cheers
Tamanna :-)
Hi,
It's working fine on my machine and i am getting the output as 20. which jdk version are u using? Coz i am using jdk1.3.
------------------
Cheers
Tamanna :-)
Hi,
There is a simple explanation to it. That 100 can easily fir inro byte's 7 bits. so it soes not give any error even i u r not type casting the value to byte. where as if u put the value of ini variable as 256 or something more. The program will not compile and will give u an error
possible loss of precision
found : int
required: byte
byte b=i;
^
1 error
I hope i made my point clear.
------------------
Cheers
Tamanna :-)