Sachin Adat wrote:
Prav sharma wrote:
I think you meant int[] int_arr = new int[10];
meera kanekal wrote:This is regarding material from SCJP5 K&B in CH3 page 200 on the subject of Local Arrays.
Array elements are given default values regardless of whether they are declared as an instance or local variable. I understand that.
"The array object is itself not initialized if it is declared locally. In other words, you must explicitly initialize an array reference if it is declared and used within a method, but at the moment you construct an array object, all of its elements are assigned their default values". This is the part I am having difficulty with. Can anyone illustrate this with an example?
Thanks,
Meera
sandeep muley wrote:java.util.scanner classes uses whitespace as default character or , as default delimeter
Dinesh Tahiliani wrote:Didn't get you my friend. can you please expalin in simple terms with the example mentioned by me
:?:
Dinesh Tahiliani wrote:
Hello Ranchers,
have a doubt in above example.
I am using the for enchanced loop. Not understanding the thing that how come students(in this case is arraylist ) assign to Student(which is the class). Can anyone shed some lights on this please :?:
Markus Ă–llinger wrote:I just passed the certification exam today and am happy to share this with you. Unfortunately, I only discovered this forum and the helpful information yesterday afternoon so I had to stay up till 2 o'clock in the morning to digest all the helpful information found here, especially the mocks and stuff. Many thanks for this, even though I barely had time to study it all!
On a different note, I really have to say that the questions they are asking you there are often stupid. You often run into questions where you'd rather say: don't write stupid code like that and you don't have to answer it. Many things are purely theoretical and can be avoided altogether by mere coding conventions. Other stuff requires you to memorize APIs by heart where a simple codeassist does the trick in real life (who cares whether the static method to check for interruption is isInterrupted() or interrupted(), the development environment tells me anyway). And then come the pitfalls, a simple static missing here and there or a missing =, a subtle compiler error the IDE would tell me about without even having to compile the whole project.
Don't get me wrong, I am an old-timer and have been using emacs and even line editors for development but I am not keen on doing it again. The exam focusses on skills you don't really need. There are a few things that are worthwhole lile concurrency and a few others but a lot of the remaining are just dumb. This is especially true in the category declarations, initialization and scoping, the examples they are pulling out of their ear there are horrible.
That being said, I must say, I don't really know what I should think if somebody would hand me over his SCJP trying to convince me that he or she is actually able to code.
I'd probably say, great, you passed the exam, certainly an accomplishment, but let's get to another topic, how about your coding skills...
Abhi vijay wrote:
Here the class inside seth is an anonymous class. Why isnt there a semicolon??
Ruben Soto wrote:Punit, I want to take my exam soon, maybe in the next few weeks. The problem is that the more I learn the more I realize I don't know, but I think you need to stop at some point and just go for it.
Punit Singh wrote:Yes, same way.
First conside private modifier then consider about final.
private is not visible, than private+final is also not visible.
Abhi vijay wrote:
Yes, I know private methods are not inherited so they are not overridden.
Final methods if overridden give compilation error.
IF I replace line with private+final, then the result is the same that method() is treated as an independent method?
Abhi vijay wrote:If I override a private method in a sub-class, then that method will be considered as an independent method.
And If I override a method, marked private+final, its the same as above right?
Olly Ontario wrote:No they did not take my voucher nor did they scratch the silver foil off the vocher. They just made me fill a form and gave me a date and time. I still have the voucher with me.
Regarding giving the exam a day earlier... all the slots are full here.
Regards,
Olly