Home » Java Technology

Java Professional Certification

Can a static method be final?Sat, 12 Jul 2008 20:43:00 GMT

Hai ranchers, Please see the code below. This is from jiris mock - 3.What is the output of trying to compile and run the following code? (Select one correct answer)code: public class T021 { final static int j = 0; //1 final transient int k = 0; //2 transient volatile int l = 10; //3 final stati...

Comments (8) | Promote | Bookmark

Post Increment & PreIncrement OperatorsSun, 13 Jul 2008 11:00:00 GMT

public class printVal { public static void main(String[] args) { int i = 20; System.out.println(i = i + i++); System.out.println(i); }}What will be the value of i, and with justification..Thanks in advance...~rAm...

Comments (7) | Promote | Bookmark

Passed 84 %Sat, 12 Jul 2008 09:03:00 GMT

Hi,Passed with 84 %. A bit disappointed with score,but overall happy now that it's out the way.Preparation consisted of-HFSJ-Whizlabs-Specs for JSTL-Plenty of Coffee...The Whizlabs simulator has a nice GUI to it and the questionsare much harder than the real exam.However It did pose a few qu...

Comments (7) | Promote | Bookmark

JSPSat, 12 Jul 2008 09:15:00 GMT

Hi Ranchers, I am trying to learn JSP and Servlets. I have a question I installed Tomcat in my PC. I am able to access local host (http://localhost:8080/index.jsp).I wrote (rather copied ) a small piece of code<html><body><h3> Hello ${param.userName} </h3></body>&l...

Comments (6) | Promote | Bookmark

Use of PoseidonSat, 12 Jul 2008 21:08:00 GMT

Perhaps this message is a little off topic - but it's not in the sense that I am very much hoping to find a good tool for completing my assignment.I here that many people on this board particularly like working with Poseidon. I was really enamoured with it, having used Rose and visio previou...

Comments (6) | Promote | Bookmark

NX:Question about searchingSat, 12 Jul 2008 20:17:00 GMT

I'm still not clear with the searching requirement:"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."for the first sentence, does it mean the user doesn't input anything and the res...

Comments (6) | Promote | Bookmark

Whizlabs simulatorTue, 15 Jul 2008 21:43:00 GMT

I have been looking to make the purchase, and wanted to see what the benefits were, is it like the real thing? Is there an expiry on usage?...

Comments (6) | Promote | Bookmark

Question on Exception HandlingSat, 12 Jul 2008 17:46:00 GMT

class Level1Exception extends Exception {}class Level2Exception extends Level1Exception {}class Level3Exception extends Level2Exception {}class Level4Exception extends Level3Exception {}class Test21 { public static void main(String args[]) { int a,b,c,d,f,g,x; a = b = c = d = f = g = 0; x = 3; t...

Comments (5) | Promote | Bookmark

i don't get shift operators!Sat, 12 Jul 2008 18:33:00 GMT

i don't understand the following senario for the shift operator:code:class BitShift { public static void main(String [] args) { byte x = 1; // or simply 1 x <<= 7; System.out.println("After shift x equals " + x); }}the result of this code is -128, i'll try to explain it, if i am wr...

Comments (5) | Promote | Bookmark

PortableRemoteObject narrowingTue, 15 Jul 2008 21:08:00 GMT

When - and why ? - it's necessary to use javax.rmi.PortableRemoteObject.narrow ?...

Comments (5) | Promote | Bookmark

Anyone for the SCJD in Sweden?Sat, 12 Jul 2008 20:53:00 GMT

Hi,I thought that we could get together and discuss the assignment.If you think this could be a good idea send me an email at manuel-p@dsv.su.se/Manuel...

Comments (4) | Promote | Bookmark

static method findAncestorWithClass ?Sat, 12 Jul 2008 08:56:00 GMT

This was a question posed in j2eecertificate.comConsider the following JSP code. How can the child tag table get a reference to the tag handler of the parent tag body? [Check all correct answers]1. getHandler() method from the TagSupport class.2. findAncestorWithClass() static method in the TagS...

Comments (3) | Promote | Bookmark

"return" statement inside try blockSat, 12 Jul 2008 21:42:00 GMT

Hi,I'm new here. Just read this strange code block, and tried it.But I can't explain why the result is...code:public int test() { int r = 0; try { r = 1; return r; } finally { r = 2; // return r; }}As we knew, the flow still come to finally block and assign r = 2 even we have return r; i...

Comments (3) | Promote | Bookmark

Why not to enclose in try-catch block?Sat, 12 Jul 2008 21:21:00 GMT

here is the program that i tried to compile...import java.io.*;class Writer4 { public static void main(String... args) { try { String[] files = new String[50]; File search = new File("newDir"); files = search.list(); for(String fn: files) System.out.println("Found:: " + fn); } catch(IOException...

Comments (3) | Promote | Bookmark

commercial mock test simulatorSat, 12 Jul 2008 18:03:00 GMT

hai friends i have filled the form of scjp i need help actually i need more and more questions some body has told me that jqplus is very good s/w but i am not able to afford any more after buying scjp brocher plese any body help me send me copy of it by mail i will be very thankfull to him it is...

Comments (2) | Promote | Bookmark

How Tomcat in Win2k/NT find JDK/JRE in non-existent directory?Sat, 12 Jul 2008 09:15:00 GMT

I have downloaded, installed in Windows2000 Advanced Serverfrom binaries:HTTP apache Server (from apache_1.3.22-win32-x86.exe)jakarta-tomcat (from jakarta-tomcat-4.0.1.exe)set TOMCAT environment variable.It all worked I saw and played with examples of servlets and jsp.But during installation jak...

Comments (2) | Promote | Bookmark

ConstructorsSat, 12 Jul 2008 11:48:00 GMT

Hi,The following program gives an output 22.Seems to me that Line1 calls add method of Extension class.Am confused as how a base class constructor calls the subclass method ? class Base { int i; Base() { add(1); } //line1 void add(int v) { i += v; } void print() { System.out.println(i); }}class...

Comments (2) | Promote | Bookmark

latest scwcdWed, 16 Jul 2008 23:35:00 GMT

is SCWCD 1.5 available.what is the latest version in the SCWCD.Thanks in Advance....

Comments (2) | Promote | Bookmark

How to Get Exam Voucher ?Sat, 12 Jul 2008 18:16:00 GMT

Hello Friends !I really frustrated to get an exam voucher for scjp 1.4. How you guys are purchasing vouchers. Can anybody in USA purchase for me to use here ? Even to purchase in India, what is the procedure ? Please give any phone numbers to purchase voucher if possible please help. i am ready...

Comments (2) | Promote | Bookmark

Need help with generics( was Unwinding Generics -Part 1)Sat, 12 Jul 2008 22:02:00 GMT

Well I had a hard time to learn GENERICs and its syntaxes with which millions of possiblities arisies after several permutation and combination.All I learned so far is what are the significance of Generics (during compile time) and that it doesn't exists at Runtime. I decided to take help fr...

Comments (2) | Promote | Bookmark

HeadFirst Servlets & JSPsWed, 16 Jul 2008 23:50:00 GMT

Hello everybody ...I just got my first Sun certificate last week (SCJP) and used the book: Sun Certified Programmer & Developer for Java 2 Study Guide (Exam 310-035 & 310-027) from Kathy Sierra and Bert Bates. It needs no confirmation that this book is the best to prepare yourself for the SCJP e...

Comments (1) | Promote | Bookmark

Problem running advice client.Tue, 15 Jul 2008 21:40:00 GMT

I was able to deply the AdiveApp without any problems but when I run theAdviceClient I get the error:javax.naming.NoInitialContextExceptionThe error occurrs when I run the line: Object o = ic.lookup("Advisor");...

Comments (1) | Promote | Bookmark

JSTL, Expression Language.Sat, 12 Jul 2008 09:00:00 GMT

HiI am new to JSTL, Expression Language.From where should i start it.Give me some links...I am not good at taglibs. Should i go ahead and master it first or hitting ELm JSTL would be a nice idea......

Comments (1) | Promote | Bookmark

Difference betwn 081 & 082Wed, 16 Jul 2008 23:55:00 GMT

Hi All, Can anyone brief me through the difference between SCWCD 1.4 and SCWCD 1.4 Upgrade.Thanks....

Comments (1) | Promote | Bookmark

Thanks!Tue, 15 Jul 2008 11:53:00 GMT

Dear Ajith,Thanks for such a prompt and kind action!!!I am sure this step of creating separate XML Certification Forum will be of great help.I promise to support this action of yours.Regards and best wishesPurveshXML@Whiz - IBM XML Certification Test Simulator http://www.whizlabs.com/jwhiz...

Comments (1) | Promote | Bookmark

array elementSun, 13 Jul 2008 10:40:00 GMT

static char ch;//implicitly \u0000 default value is assigned for chint[] ia = new int[1];ia[ch]=5;//line 3SOP(ia[ch]);at line 3,i am thinking like ia[\u0000] is executed.\u0000 is emptyspace.then how come ia[0] is printed....

Comments (1) | Promote | Bookmark

how does System.out.println() worksSat, 12 Jul 2008 11:51:00 GMT

from many days i was just thinking that how does the System.out.println() works in java.I refer many books but not getting the right explanation....

Comments (1) | Promote | Bookmark

JMenuSat, 12 Jul 2008 20:44:00 GMT

Hi i have placed a JButton and JTextField into a JMenuItem now when the menu expands i see both of them. The problem is when i hit the button i'd like the JMenu to close, does anyone knows how to force it to colapse ?Thanks....

Comments (0) | Promote | Bookmark

Enthuware Question ID: 1074483088830Sun, 13 Jul 2008 19:05:00 GMT

Question ID:1074483088830 Time Left: 01:27:47I say option b) Page 2 as println() on out doesn't throw IllegalStateException.They say option d) IllegalStateException at Runtime.What do you say?Question 6 of 69 (Answered Wrong)Consider the following code snippets. What will be displayed on the...

Comments (0) | Promote | Bookmark

scope & actionsSat, 12 Jul 2008 09:03:00 GMT

Hi,Any one have list of actions where default scope is 'page' and look only in page scope and also list of actions where if scope not give, look for all four scope and if key not exists then create in page scope.. Please help me...I know one[u]Default Page Scope and look only there[/u] -...

Comments (0) | Promote | Bookmark