This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Narayana Murthy

Greenhorn
+ Follow
since Nov 13, 2000
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 Narayana Murthy

Thank you Anbooo Sanygao
For ur kind information on my thread thanks once again.
Yes Murthy u can do whatever u hv asked. If u finish the exam early then u can review/change ur answers. Also u can mark the Qs which u need to spend more time and do it later. So dont worry abt that. Good luck
Hi all
Shall we use back button in the exam to modify previous answer ?
And also we finished the exam before then we can go back and view the questions to modify?
Thanks in advanse...
Murthy
Hello Sahir
I understood what u are saying but one thing i have to remember u that u told that runtime system ignores it but i am not sure this will happen why because all necessary classes will be loaded in to the JVM at the time of class loading only class loader will invoked when we called the interpreter how come it ignores by runtime system please clarify me ..
Murthy

Originally posted by Sahir Shah:

Narayana Murthy,
Sorry. I might have misunderstood your question. The above post contains instructions on fooling the compiler. About what is
actually happening here. Well I dont know the full story yet. Apparently access modifiers are only checked at compile time in certain cases. So after you compile the caller class if the called class has been modified and the access modifier is now private the run time system ignores it. It isnt working with the java native classes right now. But it is worth a try.

Rgds
Sahir


Hello Sahir Shah
I am not able to under stand what u are saying in this thread can u please explain me in detail ..
Are u get that private method access why that is getting from test class if so please give a solution for that ..

Originally posted by Sahir Shah:

Narayana Murthy,
Use the same method you use for creating your own packages eg:- package com.yourname.packagename;
For details refer to Bruce Eckels TIJ or
Patrick Naughton's The Complete Java Reference ( Chapter 9. Packages and Interfaces. Section - Understanding CLASSPATH.)
Asim Wagan,
I am not ready yet to post the code because I am not able to conclusively prove that you can get at the foundation classes private members. All I have managed so far is to fool the compiler. It has to run successfully and bushwhack one of the core classes. If I manage to do that I shall certainly post it here. If any of you guys have any suggestions please post it here. Many heads are better than one.
Rgds
Sahir

[This message has been edited by Sahir Shah (edited November 17, 2000).]


Hello Sahir Shah
I seen ur tactic to get the system classes access but i am not able to under stand it 100% what u are saying . I done some thing by seeing ur thread i don't know whether it is same as u think about it or not please see this code and give me exactly what u are thinking about this.
public class Integer
{
public static void main(String s[])throws SecurityException
{

Integer i = new Integer();
System.out.println(i.getClass()+"\n"+i.getClass().getSuperclass());
java.lang.reflect.Method m[] = i.getClass().getMethods();

for (int j=0;j<m.length;j++)>
System.out.println(m[j].getName());
}
}
This program i created with Integer name only it is compiling u said that jvm is taking this as java.lang.Integer what i understood with ur post.
But when i do introspect this class it is not taking as a java.lang.Integer class.
Please clarify me if at all i goen wrong ...


[This message has been edited by Narayana Murthy (edited November 16, 2000).]
Hai Graeme Brown
Thanks for giving a quick reply.
But i am not expected this response from u . I told in the previous thread that forgot about scjp exam and i need some clarification about this . Can u please give the clarification for this ?
I am expecting a good response on this from u ..
Thanks once agian..
[This message has been edited by Narayana Murthy (edited November 16, 2000).]
Hai Graeme Brown
I know that this is a certification forum and as per my knowledge i don't think that to clear the doubt where we are ? Is it right or not . Who says that for certification there is a rule that they will give public static void main(String arg[]) only why not private static void main(String args[]) if at all it is there please notify me...
I am confused with jls there i seen that for main method it is must be public and in the practise it is working with out public also why this ? please clarify me...
[This message has been edited by Narayana Murthy (edited November 16, 2000).]
Hai Sahir
I have seen that it is amazing to see that result i am really surprised about that .
Can u elaborate what is happening besides screen please.
Is there any old ref to that class if so also i changed the content of the class then also it is giving what is happening here please elaborate this .
Thanks in advanse.
Hi
I am very much confused with this statement can u clarify me vividly please this statement
int(3)->long(4)->float(5)->double(6)
what is the meaning of this clarify me please
hello Sahir
U can not call private methods out side the class .
That will not call foo method at any cost see once again.
I am not getting why u got that so please see once agian and clarify me .
in sun jls they clearly mention that main method must be a public then how come this ?
that is what my doubt are u getting me .
Hi
Congratulations to ur hard work .
And I need to clrify that SCJP 2 containg java.net package some body saying me that they get some questions in net package is it true if so give me some questions and tips to my id nbugga@usa.net
Thanks in advanse.
And all the best if u have any idea to overcome fear in io package please give me tips on that.
21 years ago
Hello Ajith Kallambella
I have seen ur answer for this but i am not satisfied with that u are saying that the main method will work with private modifier also. Sun people are not considering this as a bug, then why in jls they given that public is must for main method can u elaborate this for me please .
[This message has been edited by Narayana Murthy (edited November 14, 2000).]
Congrats Velmurugan
It is very nice score any how u got result for ur hard work ..
I want to know that this exam is included net package is it true then u got any questions from net package particulary regarding socket programming ?
If so then tell me that questions and some more tips on this exam to my account nbugga@usa.net
Thanks inadvance.
[This message has been edited by Narayana Murthy (edited November 14, 2000).]
[This message has been edited by Narayana Murthy (edited November 14, 2000).]
21 years ago
Hi all
I have a small doubt please clarify me
What is the prototype for main method it is seeing silly question but i am confusing with this.
public static void main(String args[])
in the above prototype java language specification giving that all are required but i am getting the class executed with out public also then what is the prototype for main method. If it is required public then why it is executing with out public if not in jls why they are given that public is required for main method
can any one clarify me...
Hello Manohar
Java is not os specific language it doesn't require more than DOS os to execute its class files.
Interpreter will execute the byte code of java class ,that all requires is for invoke java interpreter we have to set the classpath of jdk then it will be executed in dos environment also.
This is perfetcly right environment for java to execute its class files.