Albert Gray

Ranch Hand
+ Follow
since Mar 06, 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 Albert Gray

Hey Satya,
You sound very enlightening to me. Please tell me more what the other possibilities are in the same line of thought. As you indicated WEB-INF (i know it) and also has a xml file in it and it mostly confuses me! May for mapping we need it. But there is a need for mapping and why xml? Excuse me if I am pointing to wrong directions.
Thanks for your(anyone else also plese) attention againg.
Regards
Albert

Originally posted by Madhav Lakkapragada:

Depends on the source of myJsp.jsp. If it uses any
Java classes (may also be called Beans), then you need these
classes to be in the CLASSPATH of Tomcat. Generally,
these should be placed either individually in the
webapps/myApp/WEB-INF/classes folder or in a jar file
in webapps/myApp/lib folders.
regds.
- satya


[This message has been edited by Albert Gray (edited August 04, 2001).]
[This message has been edited by Albert Gray (edited August 04, 2001).]
22 years ago
Hi,
Say you have Tomcat 4.o b6 as your server, and you have a jsp file (myJsp.jsp) in your Tomcat's webapps directory and everythimg is running well.
What else you need to run myJsp. jsp file from the scratch on your IE5.5 browser?
Thanks for your attention.
Albert
22 years ago
Hi Fintan,
It's great that you are with us! Thank you so much.
<blockquote>
-------------------------------------------------
I've some basic question on the subject as follows:
> what is the need of CORBA in language design and what
could be the other parallel alternatives of CORBA?
> Why I should choose CORBA?
> What makes CORBA important in terms of Java?
> What are the raw materials (I mean necessary knowledge)
you need to start with CORBA?
> How do you see the future of CORBA?
----------------------------------------------------
Thank you for you reply.
Best regards,
Albert
</blockquote>

Originally posted by Fintan Bolton:
I would like to start off this thread by saying a few words to introduce myself and my book, Pure CORBA. I am a latecomer to the world of professional IT. My background was originally in the natural sciences, where I began my career in soap bubbles and then progressed to spend a few years researching quantum dots. In 1996 I joined IONA and for the past five years have divided my time between consulting and technical writing in the CORBA realm.
I should also say a few words about the book, Pure CORBA. Since it has only just rolled off the presses, I doubt that anyone has seen it yet (I haven't ). My main aim in writing the book was to produce a comprehensive introduction to and reference for the core CORBA features---the kind of book that would be useful to have at your elbow while coding. I also wanted to be faithful to the specification itself, instead of documenting a particular ORB implementation.
There are more details about the book on my website - http://www.pure-corba.com - for anyone who is interested.
I look forward to answering any question you might have about the book and CORBA in general.


22 years ago
Hi Ajith,
I understand your viewpoints. But just think once, almost 47,000 people are already with Javaranch's Certification Study. So, in short, Javaranch is a place for clarity and quality. If a handful of people always plays music of PAKISTAN, then it will boil the minds of other nationals automatically. So, I would think of stopping such threads lot earlier!
Albert

Originally posted by Ajith Kallambella:
Guys, please keep away from digression. This forum is for discussing SCJP related topics only. I will be forced to close this thread if it contains anything that is not directly related to Java Certification. Ofcourse, you can discuss issues like this in the Meaningless Drivel.
Thanks!
Ajith


Hi Scott/Cameron,
My point is you can keep any one of the three return statements in try, catch or finally blocks and it will print 'finally'. You not necessarily have to comment out return at the finally block.
Secondly, the given answer says that return statement at the finally block is unreachable. Otherwise choices 1,2 and 3 are valid. The three choices are:
1) if inpit "0.1" then it will return 0.1 and print finally.
2) if input "0x.1" then it will return Foalt.NaN and print invalid input 0x.1 and finally.
3) if inpit "1" then it will return 1 and print finally.
Would you please justify this again.........
Albert
To my understanding "mock exam" is not a professional pharse but the "sample question". But basically u rae right!
Albert

Originally posted by Christophe Lee:
So...uh....I never did find out the difference between the "mock exams" and the "sample test papers".


I just added the main method with the class name parstIt in order to print. The explanation given is that the 'return' statement in finally block is unreachable, otherwise it will print options 1,2,3(please see the options in the JQPlus applet).
I find that if you comment out any of the 'return' statements at 'try', 'catch' or 'finally' blocks, it will print only "finally". That does not match with JQPlus - I need further clarifications pls.....
Albert
//Question ID :957638871199
//Following is a supposedly roboust method to parse an input for a float....
class parseIt
{
public static void main(String [] parse)
{
new parseIt().parseFloat("0.1");
}

public float parseFloat(String s)
{
float f = 0.0f;
try
{
f = Float.valueOf(s).floatValue();
return f ;
}
catch(NumberFormatException nfe)
{
System.out.println("Invalid input " + s);
f = Float.NaN ;
//return f;
}
finally { System.out.println("finally"); }
return f ;
}
}
Hey Paul,
I am totally agree with your vivid insults to a mentality like Abdul holds. Although I do not agree with your comments about lower animals - beacuse lower animals like rats are very very honest in dealing with worldly affairs - don't agree, read Evelutionary Biology!!!
Anyway, Mr. Rahim's mentally should be stopped in whatever ways! This kind of ideas are the contaminats of the worlds and should be avoided even if it's a very helping materials. I request all the Java (is'a great language) minded people to uphold their ideals; it will certainly pay you in the end - trust me.
Albert (^..^)
===============

Originally posted by Thomas Paul:
Speaking for myself, if you copied anything from my site without permission I would send some boys to your house to give you a serious talking to. First off it's against the law to copy copyrighted material without permission. Second, it's a real scummy thing to do. This type of behavior is normally limited to sewer rats and other low forms of life. If you want to make a collection of mock exams then the best thing to do is to supply a link to other people's hard work. How is Marcus supposed to maintain his mock exam and update it if it's on your site?! If Marcus needs to correct an error and corrects his own page, he's then going to get stuck naswering complaints from people viewing his obsolete site on your pages.
Even worse, you are running banner ads over other people's work. So you are trying to make money off the hard work of others! Talk about low-life!


The last line prints out 8, 6, which is ambiguous to me. Would you comment........ clarify.....?
<BLOCKQUOTE>
class ij
{
public static void main(String args[] )
{
int i =0;
int j =10;
tp: for (i= 0; i<j; i++)<br /> {<br /> <br /> System.out.println("i = " +i);<br /> <br /> i++;<br /> <br /> System.out.println("After ++i: i = " +i + ", j = " + j);<br /> <br /> if (i>j)
break tp;
j--;

System.out.println(i + " " + j);
System.out.println("--------------------------------" );
}

System.out.println("=============================");

System.out.println(i + " " + j);
}


}
</BLOCKQUOTE>
Albert
For character encoding we can use InputStreamReader and OutputStreamReader. What can we use for character decoding?
Albert
Hi Sriniva,
It'd be more than obvious if you compile and run your code with and without pack(). In short, this pack() is a real world packing. Answer to yourself - why do you pack your things up?!!!?
Albert

Originally posted by srinivas bolloju:
can any body pls explain :
1)what does pack() do here below??
2)my ans is as,borderlayout is the default mgr for frames,the 3 buttons will appear in center one on other,the top position occupied by three,am i right???
import java.awt.*;
public class FrameTest extends Frame {
public FrameTest() {
add (new Button("First"));
add (new Button("Second"));
add (new Button("Third"));
pack();
setVisible(true);
}
public static void main(String args []) {
new FrameTest();
}
}


I am not quit following how the String variable m of the following application working to produce output: 1, 3, 2. Anyone to explain tje logic of the output?

public class initialize
{
private static String msg(String msg)
{
System.out.println(msg));
return msg;
}

static String m = msg("1");
{
m = msg("2");
}

static
{
m = msg("3");
}

public static void main(String args[])
{
Object obj = new initialize();
}
}
Albert
[This message has been edited by Albert Gray (edited July 02, 2001).]
Hi Dave,
Do you mean that if a moethod or part of a method or a block is not synchronized, then it has nothing to do with lock. Or in other words, when a thread gives up the lock on a monitor it still may be run by the CPU. Please clear me then.........
Albert

Originally posted by Dave Vick:
Albert
Keep in mind that just because a thread gives up the lock on a monitor it doesn't stop running. It could have just left the synchronized part of the code. In which case it'll keep running until the scheduler schedules something else to run. A thread only needs to have the lock when it is going to be working on sychronized objects (blocks).

Dave


Although it's totally personal but it might be obvious that people only reveal their scores when they get 96%, 93%, 88% or something alike. But we usually do not see postings from people saying that they scored 61%, 55%, 62% or the like. But imagine the true reality!!! I leave it up to you! I have made a joke to my friends recently that when someone says that he/she scored 98%, means that he/she failed 3 times at least!
Well, rejoice and feel good even if you score 47% or 63% at the first time. SCJP is all about getting 61%, nothing more nothing less.
Albert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Originally posted by Drew Lane:
I don't want to psych myself out here, but does anyone know what percentage of people actually pass the SCJP exam the first time?
Regards,
Drew


[This message has been edited by Albert Gray (edited July 02, 2001).]
[This message has been edited by Albert Gray (edited July 03, 2001).]
Look at your code (I just added 2 lines for printing the object). Now I still see anObj still printing "sample", after line 11, meaning that it will not be Gced after line 11. So my answer is none of them.
public class Base{
private void test() {
if(true) {
String anObj = "sample";
String locObj = anObj;
anObj.trim();
anObj = null;
locObj.trim();
System.out.println(anObj);//null
System.out.println(locObj);//sample
}
}
static public void main(String[] a) {
new Base().test();
}
}
Albert

Originally posted by sunil kathuria:
following question is from mock exam -SARGA.com
At what point is the object anObj available for garbage collection.
01: public class Base{
02:
03: private void test() {
04:
05: if(true) {
06: String anObj = "sample";
07: String locObj = anObj;
08: anObj.trim();
09: anObj = null;
10: locObj.trim();
11: }
12: }
13:
14: static public void main(String[] a) {
15: new Base().test();
16: }
17:
18: }
Select most appropriate answer
a) After line 7
b) After line 8
c) After line 9
d) After line 10
e) After line 11

answer given is -- >e
but whereever i think it should be c as when we set "anObj" to null it will be available for gc.
pl. tell me the right answer and correct me if wrong
thanks in adv.
sunil