Raj Shah

Greenhorn
+ Follow
since Sep 24, 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 Raj Shah

Hi Liz,
Thanks for your advice. I'll contact both the agencies and let all of you know the outcome.
Thanks again,
Rajesh shah
22 years ago
Thanks Gagan and Jane,
The center people did call up Delhi (main office of Sylvan) but the guys cudn't help much as they say the site report is sent directly to SUN's server nad any info can be had from them only which will take time. Can't help it I have to go thro' this harrowing experience. This surely puts a big question mark on the quality of program that the SUN people have developed( I understand that it is developed in JAVA). The way I am getting feedback from other scjps that they too had similar probs., I surely feel that somebody representing all of us from javaranch must contact the SUN people and get such glitches removed. If they can't do it then surely we at javaranch have expertise available to help them out with this.
One more thing I wanted to know about the error that I faced: "Response Logon Format error". Is this regarding the last feedback part that they take from us, because in my case I didn't get any such feedback response window at the end of the test.
I am also sending a mail to Liz to help me out.
Thanks again
Rajesh Shah
22 years ago
Thanks everybody, but the center guys are unable to help. they say that the whole program is loaded back directly to the Sun's server, and the results can now be had only from them which will take a week or so. The contact address u guys provided shows a contact add. as who2contact@central.sun.com, but when I try to send the mail, it says the mail server is not found.This is the first time I realised how far and elusive our SUN is from us. Any other mail address will help me a lot. I have posted a msg for Elizabeth Lester too.
Thanks again,
very disturbed
Raj Shah
22 years ago
Hi,
I gave exam on the 12th of Oct. The program had some error at the
end and flashed Response Logon Format error and did not print my results. Although the test center guys did show me that I had passed but they cud not give me the result/ breakup.(I was very well prepared so had no doubt about passing the exam)
Now they are saying that it will take almost a week to actually get my results from Sun (as if they are truly going to get it from the planet SUN). This wait is truly coming to my nerves . I read that you can give me the mail address of the right person to contact in this regards. pl. help.
p.s. Any body having Liz's mail address pl forward this msg. urgently

Thanks
Rajesh Shah
rajbrijshah@yahoo.com
rajbrijshah@hotvoice.com
22 years ago
Hi Everybody, I passed the SCJP2 exam today. But Could not get the detailed marksheet as there is some problem in the program. It says "Response Logon Format error".They could just show me the pass result in the admin window but could not print the result.

I did very well and expect 90+ %, but alas this wait for the actual result is Killing me.
The center guy says that due to the weekend it might take a few days before I come to Know my reuslts.
Any of you guys who have faced similar probs. let me know if I will get the results ultimately or not.
Thanks and I will be hanging around with you all here, at javaranch.
Raj Shah
rajbrijshah@hotvoice.com
22 years ago
Hi Angela,
This same problem came to my mind as well. But after you have narrowed down the valid possiblities, what I figure out is that:
For a method returning some type:
execution path can be:-
try-->last block after catch -->return to calling program
try-->catch-->last block after catch-->return to calling program
try-->finally-->last block after finally-->return to calling program
try-->catch-->finally-->last block after finally-->return to calling program

01) The try block and last section of the method block forms a normal path. But as a try block is always associated with either a catch block or a finally block or both, there is no meaning of a return in try block if you specify a return in these later blocks.
02) The catch and the finally block form the abnormal condition and create an alternate path to the normal path. They are invoked internally by the jvm and they both can have a return specified (irrespective of a return specified in try block), but the last value returned will that be of finally block.
This catch/finally block being called after the try block takes care about the redundant return in try block.
03) any return present in finally OR in "catch W.O. finally" will transfer control to the program where you are calling this method and hence any thing within the method after this catch/finally code block , in such condition, will be unreachable.
04) also in try or catch or finally block there can be exception thrown before return. So In every later block that your program may call upon internally after throwing the exception, you may specify a return.
Raj Shah

Sun Guoqiao's Mock Exam No.2 ex. no. 9
public class Test009
{
public static void main(String args[])
{
Test009.Inner inner1=new Test009().new Inner(); //1
Inner inner2=new Test009().new Inner(); //2
inner2.method(); //3
Noninner ninr=new Noninner();// This has been added by me
//ninr.methodA(); //4 This has been added by me
}
class Inner
{
private void method()
{
System.out.println("0");
}
}
}
// This portion has been added by me
class Noninner{
private void methodA()
{
System.out.println("10");
}
}
____________________________________________________________________
My Doubt:-
The method invocation at //3 works fine even though it calls a private method of inner class in other class (Here it is the enclosing outer class.).
The method invocation at //4 (commented out) causes the expected compile time error due to invocation of private method in other class.
Why this ambiguity? Does it mean that any method( having any access modifier), defined within an inner class is also visible in the Outer/enclosing class?
Please Clarify?
Thanks in advance,
Raj Shah
Hi Manish,
I had asked a similar question which was clarified at great length by Jose Botella. Here are the details:
_________________________________________________________________
We have to consider both the list of arguments and the class where the methods were declared:
A method is more specific than other if it was declared in a class that is the same or a subclass of the other, and if each of its arguments have the same type or can be converted by a widenning conversion to the corresponding types of the other method.
_________________________________________________________________
As per this, let us see in your case:
Is the first method declared in D more specific than the one declared in B? It could be because D extends B, but it isn't because double can't be converted to int via a widening conversion.
Is the method declared in B more specific than the one declared in D? It isn't because B can't be converted to D via a widening conversion, although its argument type int can be promoted to double.
So none is more specific tham the other and the ambigous error is produced.
Read JLS 15.12.2.1 for more on the subject.
HIH
Raj shah
Hi Jose,
Thanks for that great explanation.
Raj
Hi Jose,
Could u elaborate a bit more on the ways to handle the checked exceptions in the derived constructors.
What else can we do apart from just declaring that the derived constructor also throws the same exceptions and then enclosing the instance creation of subclass within a try-catch block in the main method of subclass.
As far as the code given by Angela, There will be one more simple error of "can't make static reference to method void methodA()"
Thanks
Raj
Hi there,
the following are two ways of coding overloaded methods in super and subclass.
Case 1:

public class A extends Base {
public static void main(String[] args) {
A obj=new A();
char c = 'V';
int i=100;
System.out.println(obj.m1(c));
System.out.println(obj.m1(i));
}
public char m1(long x) {
return 'X';
}
}
class Base {
public char m1(int x) {
return 'Y' ;
}
}
_______________________________________________________________
This gives compile time error of m1 having ambiguous reference to
m1(int) and m1(long)
________________________________________________________________
case 2:

public class A extends Base {
public static void main(String[] args) {
A obj=new A();
char c = 'V';
int u=100;
System.out.println(aww.m1(c));
System.out.println(aww.m1(u));
}
public char m1(long x) {
return 'X';
}
public char m1(int x) {
return 'Z' ;
}
}
class Base {
public char m1(int x) {
return 'Y' ;
}
}
_______________________________________________________________
This compiles ok.
_______________________________________________________________
Could anyone of u tell me the reason of this difference in behaviour.
Thanks
Raj
Hi there, while you all are at String literals, could somebody let me know for sure whether the String literals in the pool maintained by the class are eligible for garbage collection or not? assuming that there is no other reference existing. I read in one of the sessions here that they are Neither eligible for gc Nor garbage collected in any circumstances till the class remains loaded in the jvm. But the Exam questions on no. of objects eligible for gc normally counts such literals as well. Please answer. Thanks, Raj Shah
Hi, I have a book by Bill Brogden: "Java 2 exam. prep. guide", Coriolis, first edition:2000; which specifically mentions these words and a few more as Java reserved Words Table no. 2.1 page 17. Java Words that are reserved (for future use) but not used currently are also mentioned separately as Table no. 2.2 page 17. Words like inner, outer, cast, goto, operator, var are all mentioned in these tables. Is this an errata?
I shall surely check at the link given by you. Thanks.
22 years ago
I have been going thro' the Language fundamentals regarding valid identifiers for class names. When I use the "future use" reserved words like future, inner, outer, rest,cast as my class names it does not object and compiles the code. Any idea why it is not flagging an error?
22 years ago