Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Devjunr - Desafio 03 #1110

Merged
merged 22 commits into from
Oct 24, 2024
Merged

@Devjunr - Desafio 03 #1110

merged 22 commits into from
Oct 24, 2024

Conversation

devJunr
Copy link
Contributor

@devJunr devJunr commented Oct 22, 2024

No description provided.

@magnussolidus magnussolidus added the java Pull requests that update Java code label Oct 22, 2024
Copy link
Member

@mpinheir mpinheir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devJunr está quase lá mas está aceitando eu digitar letras ou palavras como parâmetros. Precisa tratar isso pois nunca se pode confiar no usuário da tua aplicação
java palindromicos.java A B
Exception in thread "main" java.lang.NumberFormatException: For input string: "A"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:668)
at java.base/java.lang.Integer.parseInt(Integer.java:786)
at palindromicos.main(palindromicos.java:3)

@mpinheir
Copy link
Member

@devJunr Precisa ajustar a mensagem de erro pois números negativos são inteiros também. Neste caso a mensagem de erro precisa dizer que os dois valores precisam ser inteiros positivos.
java palindromicos.java -30
É necessário pelo menos dois valores inteiros como argumento

Copy link
Member

@mpinheir mpinheir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parabéns!

@mpinheir mpinheir merged commit 8a316f1 into OsProgramadores:master Oct 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants