Javier Gonzalez

+ Follow
since May 10, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Javier Gonzalez

Hi Rob! Yes if I use the echo "Rosana&Javier" works, but without quotes doesn't work.
So to make it work I would have to change the User name, because I tried to use quotes in the path but it doesn't work.
Thank you very much for your answer!
1 month ago
Hi Himai, thank you for your answer! What would you like to see the pom.xml?
I atached it. You can see the project structure in the last screen capture.
Thank you very much!

1 month ago
Hi I am struggling to know why is not possible to run this simple spring boot program in cmd.

This program is from Spring Boot quick start guide

The error that I am facing says in Spanish:

"The system can not find the path" and later
"'Javier' is not recognized as inner or outer command..."
"Exception after calling 'DownloadFile' with the arguments '2': Exception after asking webClient"

and later in English:

+ ... pe]::Tls12; $webclient.DownloadFile('https://repo.maven.apache.org/ma ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: () [], MethodInvocationException
   + FullyQualifiedErrorId : WebException

Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain

1 month ago
I don´t have access to the FREE course of Oracle in this offer, yesterday I was able to see the videos. So the offer is just if you pay for the exam? If I book the exam for tomorrow I will have access to the videos until tomorrow?
Hell guys! I was checking if it is possible to retrieve one object from one HashSet without overriding the hashCode() and the equals():

Why returns true on the line 7?  I thought it was going to return false like in the previous contains().
Thank you for the help!
Hi Campbell! So the contract will break because we use more variable fields in the hashCode() than in the equals()? but not when we use both in equals() and just one in hashCode()?
Thank you very much Stephan! I got it! I couldn´t find the answer in several websites!
Thank you!
I read that to implement equals method and hashCode method we have to use the "same set of fields". If we have for example:

...and we use name and age to override equals, and we use just name to override hashCode...Why is wrong that? and Why we should use the same fields in both methods?
Thank you for the help!
Hi guys! Sorry for the delay. The text says:

Which exceptions will the code throw?
A. IOException with suppressed RuntimeException a
B. IOException with suppressed RuntimeException c
C. RuntimeException a with no suppressed exception
D. RuntimeException c with no suppressed exception
E. RuntimeException a with supressed RuntimeException c
F. RuntimeException c with suppressed RuntimeException a
G. Compilation fails

D is correct. While the exception caught by the catch block matches choice A, it is ignored by the catch block. The catch block just throws RuntimeException c without any suppressed exceptions.
Hi Paul! Thank you for your answer. When I put this snippet of code in the catch block and I run it in Eclipse is printing: java.lang.RuntimeException: a
So we could think is an errata of the book? Because Eclipse is printing that there is a suppressed exception in the code and the book is saying the opposite.

Hi there! I have this question from the Kathy Sierra book OCP Java SE 8 (Chapter 3, question 9)

Which exceptions will the code throw?
The correct answer is: D. "RuntimeException c with no suppressed exception"
The explanations says: "While the exception caught by the catch block matches choice A (IOException with suppressed RuntimeException a), it is ignored by the catch block. The catch block just throws RuntimeException c without any suppressed exceptions.
I really don´t understand why the exception thrown by the close method is not a suppressed exception?

Thank you for the help!
Hi Campbel,

Yes it is a cert exam question OCP 8, it is a modification of one snippet code from the Boyarsky-Selikoff book.
Thank you very much guys, I can see now what is going on!
Hi there!

I have this code snippet and when I run it with the split mehtod is not doing what I expect, divide the strings on the "a", instead it is just printing the hash code.
And when I run the code with the toUpperCase method is doing what I expect, changing all letters to capital letters.

Why is printing the hashcode instead of dividing the Strings of the text?
Thank you in advance!