We use interfaces to keep the real implementation (of the concrete class) hidden for the software which uses the interface. Some software calls on (abstract) methods on an interface, without knowing how that interface is implemented. This principle is called "abstraction".
Methods which are defined abstract HAVE TO be implemented by a concrete class.
When i was doing the mock exam on java blackbelt, I encountered some questions about forward referencing. Examples are:
I studied the book from Bert Bates (java5), but I didn't find information aboud forware referencing. Are questions about forward referencing in the SCJP java5 exam? If the answer is yes: where can i find more info on this topic?
this one is pretty tricky I think. The issue is that the sleep of both threads is invoked at the end, because the thread run concurrently and the sleep is not in the loop.
Thread one will loop and print and then sleeps, but in the mean time thread 2 does the same. When you put a print statement after the sleep statement, you will see that the threads do actually sleep.
2- There should be at least one argument passed to the main method so that assertion could fail and you get AssertionError as desired.
By combining these two, you can achieve the desired case.
I think that is not correct. when one or more arguments are passed, the condition evaluates true, so there's no error. When NO arguments are passed, the error will occur.
it's hard to say and is different for everyone. I have to do the exam myself. In the faq of javaranch there is a line which states that when you have to much trouble making the mock exams, you should be ready to take the real exam.
class Thread inherits from the interface Runnable (which declares a method run()). The class Thread has a default implementation of the method run(). When you want to do specific actions within your thread, you can override the run() method.