Renato Bello

Greenhorn
+ Follow
since Jun 20, 2012
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Renato Bello

Thank you, guys

Have some things that I still can not understand, but I'll keep pushing myself, reading the book and posting questions here. Does anyone know if there is a free online course of java?
5 years ago

Winston Gutkowski wrote:

Renato Bello wrote:I am still here with the hope that someone help me with these dilemmas.


And we're still hoping you'll comply with Henry's request. As he said, this is not optional.

Winston



I just do not include the reference source because I could not edit the first post. If you can cite the source now, I tell the script that is quoted in the book Head First Java. I apologize again for the fault
5 years ago

Renato Bello wrote:Thank you, GK

I still have some questions:

21 if (index < 5) {



- then the index will always be less than 5 because there is nothing that increments this value?

23 Mix4 m4 = new Mix4();
24 m4.counter = m4counter + 1;



- the total value of m4.counter is infinite and has no use for anything, right?

25 return 1;



- I use the return value of the method maybeNew using the parameter value "index" to add to the value of the variable "count"?

13 count = count + m4a[x].maybeNew(x);



- I still do not understand what is the relationship between M4a [x] and the method "maybeNew". (are in different methods and thought that would relate instance variables with class objects)



I am still here with the hope that someone help me with these dilemmas.
5 years ago

Henry Wong wrote:Please QuoteYourSources.



Sorry, I thought that the questions was related to the script, I didn't need to identify the parts. Have fix it.
5 years ago
Thank you, GK

I still have some questions:

21 if (index < 5) {



- then the index will always be less than 5 because there is nothing that increments this value?

23 Mix4 m4 = new Mix4();
24 m4.counter = m4counter + 1;



- the total value of m4.counter is infinite and has no use for anything, right?

25 return 1;



- I use the return value of the method maybeNew using the parameter value "index" to add to the value of the variable "count"?

13 count = count + m4a[x].maybeNew(x);



- I still do not understand what is the relationship between M4a [x] and the method "maybeNew". (are in different methods and thought that would relate instance variables with class objects)
5 years ago



I don't understand particularly the relation between the two methods (line 13 and the method "maybeNew"). How to calculate it?

If is possible, explain all this script.

Thanks



5 years ago
Thank you both
5 years ago

Jelle Klap wrote:Semantically the two code blocks are identical.
The only difference is that your code initializes the counter to 0 and increments it at the end of the loop, whereas the other solution initializes the counter to -1 and increments it at the beginning of the loop before it is used.



So my code is a possible variation? There is nothing wrong with it?
5 years ago

Adrian Burkett wrote:

Renato Bello wrote:I got a different conclusion


It would help if you told us what the difference was.



I meant "conclusion", referring me to a different logic in the composition of the script, in other words, how I solved the exercise. The results were similar
5 years ago
Solving one of the exercises in the book head first, I solved the exercise in a different way. When I compiled the two codes, the result was the same. I wonder if my code is a possible variation or is wrong in somewhere and by coincidence it worked?

Thanks

My Code:



Head First book code:

5 years ago

Greg Brannon wrote:I suggest you start by working your way though this FAQ on setting up a development environment and running your first Java program. Please come back as you have additional questions or need further guidance.




Thank you, Greg. I had already installed the sdk and now, with the instructions of the faq, I registered the path. I have tested it and ran my first app: mooooooo.

Now I can use the same process (compile with javac and run with java -class) to check the scripts of the book Head First Java, right?
5 years ago

Jesper de Jong wrote:I'm not sure that it's necessary to completely reboot the computer after adding or changing a system environment variable.

You do have to close and re-open the command prompt window though (not only on Windows 7, but also on Vista and XP), because the command prompt only reads the variables at the moment you open it - it will not pick up changes while it's open.



No need to restart the machine really, just restart the command prompt. Would be interesting to update this information in the faq
5 years ago
Hi everybody,

I'm in the first 55 pages of the book Head First, and I do not understand if I test and run the scripts or not, such as the guessing game of numbers. If yes, what should I do to test them? (procedures please). I read something about %javac but I can not imagine how to use it. To facilitate the verification of the script, I'm using a simple editor called jsyntaxpane-0.9.5-b29. It is interesting because it is a highlight over the terms and formats the script correctly, however, can not save the scripts and do not know if this is a feature of the editor or if I'm doing something wrong. I accept any suggestions for similar editors.

Thank you in advance for your help.

Renato
5 years ago
Thank you everybody.
5 years ago
In this example:




Dog (object?) in the class DogTester is referencing the class Dog or whatever?

Thanks
5 years ago