Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

naro pad

Ranch Hand
+ Follow
since May 07, 2008
naro likes ...
Netbeans IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by naro pad

I already created my controller class. My problem is how to bind the controls to the object properties.
9 years ago
Hi,
I am have just started my first javafx application and I have the following easy issue:

I have the following javafx fxml file


Now I want to bind this 4 fields to an object and use this object on the fxml controller class to pass the data entered on the form into the database .I have tried to find related examples on the Internet but without any luck. Can anyone help me.
9 years ago
Nice...thanks for your answers
Hi,

Yesterday I passed the OCPJP 1.6 and I have a question. My study was cover through this books:
- SCJP 6 Study Guide (Sierra,Bates)
- OCP Java SE 6 Programmer Practice Exams (Bates,Sierra)
I solved more that 300 questions. I notice that the exam questions were much more easier than the exercises in this 2 books. Huge difference in difficulty and also in size. The exam questions were very small in size.
Why is this huge difference between this books and the exam. Or I have taken a wrong exam. Also is there any way to view the questions and answers of my test?

Thanks
Sorry but I still don't get it...

On the API it says that subset() returns a NavigableSet<E> which is an INTERFACE. It's not a TreeSet and it can't be a TreeSet. Correct me if I am wrong please.
9 years ago
Hi,

I have the a question to the following code:



s.subSet("b", true, "d", true) method returns NavigableSet. How this can be cast to a TreeSet? On the hierarchy tree we have TreeSet implements NavigableSet. NavigableSet CAN'T DO what TreeSet CAN.

Any help please...
9 years ago
Ok...now is clear
Thanks for your answer
Hi,

I have recently schedule the exam for SCJP6 through Pearson VUE(1Z0-851). From books I have been study by Bert Bates,Kathy Sierra it writes that the exam duration is 180 minutes. On Pearson Vue page and in the Oracle official page it's writes 150 minutes. Why is this 30 minutes difference? Is anybody who has took the exam recently can tell me how much time is the exam?

Thanks
Hi,

I am have prepared for the SCJP(Sun certified Java Programmer 6) and now I want to schedule the exam. Through the exam provider (Pearson VUE) 2 exams are listed with the same name but different code. Both are called Java Standard Edition 6 Programmer Certified Professional Exam and the 2 codes are 1Z0-851 and 1Z0-851-JPN. In the official oracle page only the (1Z0-851) is listed and is 150 minutes instead of 180 minutes???. What is the difference with the 1Z0-851-JPN examination. Which one should I to choose? Sorry if this question is very specific and can't be answer.

Thanks


But, it's got to be implemented somewhere if you have a non-abstract subclass. Otherwise, you've got a class that's not valid.



Please correct me if I am wrong...
Consider that I have only this two classes. Child class is non-abstract so it has to implement all abstract methods from Parent class. Method1 has a protected access and is abstract so it's visible to Child class and must be implemented. Method2 is abstract and should be also implemented, but it has default access thus making it invisible to classes outside the package "test" like Child class. It should be illegal declaring abstract with protected access, is the same like abstract and private which are illegal.
Hi,

I am preparing for the SCJP exam and I need help to the following problem about access modifiers. I have 2 classes(Parent,Child) as shown below:

and


Now compiling Parent class is ok but compiling Child class I am getting an error saying: "other.Child is not abstract and does not override abstract method method2() in test.Parent". I can see any reason why is complaining about method2 (it has a default access and it's not visible to classes outside the package). For method1 which has protected access it would be reasonable to complain if I hadn't implement it, but with method2 it's not reasonable I think. What is the problem here?

Thanks
I think I got it...

In my example when I reassign the String variable to 'newValue' a new reference value was created with the old value existing but without any reference to it.
So I have to be careful when creating immutable objects because of leaving them unused in the memory until garbage collector runs.

Thanks a lot
11 years ago
Hi guys,

I am facing one easy question and I want your help. I am trying to understand immutable objects and I have read that Strings belongs to that category, meaning that their values cannot be changed after they are created. What this mean? I have create the following code and it's change fine:


Do I missed something?

Thanks
11 years ago
Ok know I understand... it returns a List of type AbstractList which is implement the List interface.

Thank you guys...I should have be check it before post the question

11 years ago
Hi,

I am in a confusion and I want your help. First before continue with my problem, I clearly understand the meaning of Object, Class, Data Type and Interface. When we create a Collection we declare a variable of Interface type and then assign an instance of a class that implements that interface. For example:


Up to this point I can understand. I recently saw a sample of code that didn't follow that rule and it was working fine and I want someone to explain it to me. The code was:


The Collections.nCopies() method returns a List Type Object. Which List is an Interface isn't it? How this can work?

I don't know it might be I am a little confused.

Thanks
11 years ago