Larsen Raja

Ranch Hand
+ Follow
since Nov 28, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Larsen Raja

The class files looks to have not generated properly. Stop the server. Remove the EAR. Now clean and build the project. Start the server. Add the EARs. Do a maual publish. This should mostly resolve the issue.

Additionally, take a look at the http/jvm logs or ffdc logs as well.
12 years ago

Larsen Raja wrote:Hi all,

I completed OCP, 1Z0-851 with 96%. I should have just got 2 answers wrong. One was related to concurrency and the other was some thing related to command line arguments. I would like to share my sucess story. My preparation started February, 2011 and on an average I would read related things not less than 2 hours a day.

Here is my preparation details:

1. I have read K&B around 4 or 5 times.
2. From Jan, 2012 I started working on mock exams.
3. I purchased K&B practice exams book and worked out all the practice exams.
4. I scored 70-80 in all the four practice exams. (Real exam was much easier)
5. Then I went through certain online questions like janachamp.com and some other mocks.

Inspite of all these preparations, my night before the exam was really fearful. I got up 2 times in the mid of the sleep thinking about the exam and how the questions are going to be. But the exam was pretty simple. Got almost basic questions very few complicated questions (less than 5).

At this point I would like to thank the following people -

1. K&B
2. My parents and wife
3. Ranchers
4. My collegues who encouraged me a lot
5. javachamps, enthuware, cooray simulator and other mocks...

Larsen.

13 years ago
Hi all,

I am considering doing OCMJD. Is it mandatory to take up some training? What book should I use? I have a lot of questions. OCMJD is really confusing.

Larsen.
Hi all,

I completed OCP, 1Z0-851 with 96%. I should have just got 2 answers wrong. One was related to concurrency and the other was some thing related to command line arguments. I would like to share my sucess story. My preparation started February, 2011 and on an average I would read related things not less than 2 hours a day.

Here is my preparation details:

1. I have read K&B around 4 or 5 times.
2. From Jan, 2012 I started working on mock exams.
3. I purchased K&B practice exams book and worked out all the practice exams.
4. I scored 70-80 in all the four practice exams. (Real exam was much easier)
5. Then I went through certain online questions like janachamp.com and some other mocks.

Inspite of all these preparations, my night before the exam was really fearful. I got 2 times in the mid of the exam thinking about the exam and how the questions are going to be. But the exam was pretty simple. Got almost basic questions very few complicated questions (less than 5).

At this point I would like to thank the following people -

1. K&B
2. My parents and wife
3. Ranchers
4. My collegues who encouraged me a lot
5. javachamps, enthuware, cooray simulator and other mocks...

Larsen.
13 years ago
I tried using such variables outside the block, say another method. But this brings up compilation error. The variable cannot be resolved outside the init block.


Larsen.
Hi,

Where would variables initialized in initialization blocks be used? Since the scope would be resolved to the block only, these variables cannot be used outside I believe.

Larsen
hi,

I have read K&B bok around3-4 times. I still keep reading. But I am still not confindent to take the cert exam. I have even tries K&B ptractice exams, where I have scored 70+ in all the 4 practice exams. I have also tries questions from javachamp and other mock websites. Though questions from these two websites looked simple to me, I couldnt imagine the real exam. I fear I myt not pass.


Larsen.
Hi,

What is the difference between the following two expressions?

x++;

x = x++;

Larsen.

As per the contract, once two objects satisfy equals criteria obviously their hashcodes should be equal. So considering the example stated,
Obj1. hashcode = code.length * lab.
ex: Obj1.code.length = 7 obj1.bal = 8
Obj2.code.length = 8 obj2.bal = 7;
for both the above cases, hashCode = 56.

Consider choice C:

((SortOf)o).code.length()*((SortOf)o).bal==this.code.length()*this.bal; => 7 * 8 == 8 * 7 returns true. Hence hashcode and equals contract gets satisfied at this point.

Consider choice D:

((SortOf)o).code.length()*((SortOf)o).bal*((SortOf)o).rate==this.code.length()*this.bal*this.rate;

By simple mathematics,

for equal rates, the above expression can be evaluated to nothing but choice C.

C works out normally. But D works out only when rates are equal for objects.

Correct if am worng.

Got it. Just ignored the simple fact. Since nothing is returned from the method, all the objects created in the method should be available for GC. Additionally, nothing is persisted in the static field. Thank you guys.


Larsen.
Hi,



The answer is:
At GC point 1 -> 3 objects are eligible for GC.
At GC point 2 -> 0 objects are eligible for GC.

I understand, second anser. But I feel the first answer should be => 2 objects are eligible for GC.

Larsen.



The static blocks can be put similar to the below snippet:



Hence compilation error.

Larsen.
Can I conclude that always class files will be created in the source folder of .java file when compiled without -d option and from any directory?
Shouldn't javac source/MyClass.java be creating class file in myProjects directory?