Saturday, 25 May 2013

IllegalArgumentException

Bismillahir Rahmanir Raheem

Again there are lots of ways that you can get IllegalArgumentException , one of the way is when you call a method with wrong arguments.Like when you set the priority of a thread , you must give a priority level
between 1 to 10 otherwise it will result in IllegalArgumentException at runtime.

class IllegalArgument
{
  public static void main(String... args)
{
  Thread thread=new Thread();
  thread.setPriority(11);
  thread.start();
 }
}

It will result in IllegalArgumentException

IllegalThreadStateException

Bismillahir Rahmanir Raheem

There are lots of ways that IllegalThreadStateException can occur , One of very common situation is when we try to start a thread that  already have started or completed .Because when we try to restart a thread , that thread can not handle that method in that state.So it results in IllegalThreadStateException at runtime.

class IllegalThreadState
{
   public static void main(String args[])
  {
    Thread thread=new Thread();
     thread.start();
     thread.start();
  }
}

Monday, 20 May 2013

Passing OCJP...

Bismillahir Rahmanir raheem

I was able to clear my OCJP exam with 93%. After finishing the exam i thought i would easily pass this exam.But not sure of getting 93%. Some questions were hard to understand and i was not sure of my answers.Questions like ,asking for coupling and cohesion.

Whether this code shows loose coupling or high.
Asking for Encapsulation property of a given code snippet.

You know which book to study from ,yes Kathy and Bert.

Do Devaka`s exam lab and Kathy`s Practice exam book.

You are not going to score 70 or 80 in the practice exams , hardly anyone does.

Practice exams are tough and will give you an in-depth knowledge and sometimes frustrate you.

It is very much possible that you don`t even take the entire practice test of 3 hours.
You will feel the urge to just finish the exam after 1 hour or at most two hours.

Because it is hard to sit for a practice exam for 3 hours.Because usually we don`t do that.

So i think the another way practice exam helps you is that they make you sit in real exam for 2 and half hour.

Do Practice exams ,make your notes(i have made a bundle) ,revise them.

One great way to remember the theory is to code that concept in an example.


Ask your question in coderanch , i asked my first question and get a reply in just 2 minutes .
Because Java certification Forum is most visited and famous , so it never takes  more than one day in any case for reply.

Ask any stupid question you have in your mind , they know our state.And they also know what you want to ask even when you yourself not sure of what you are trying to ask.

Study hard ,don`t take it easy.

I was quite afraid of failing the exam, and when i read the stories who have passed the exam ,i get relaxed.
Fear is natural , because probably this is the first certification test for a java programmer.

But as you study and starting to get good marks in practice test, courage will overcome the fear of failure.

So just do it.

Shukran

Wednesday, 26 September 2012

This is story of most of the classmates ,,
     Everyone is looking for a Job , well they should be doing this
     Nothing wrong in this .

So why this Tension ..
     I studied 4 years of the graduation , I justified my Studies.
     Now i should get a Job even not so highly paid.
     I have the skills but still it makes tense
     Still produces fear
Allah says
    I have planned for you your part of income
    and in other verse in Quran he says
    "I will provide you fro where you can`t even imagine"

So why this Tension ..