Posts by pedrocarboni • 117 points
3 posts
-
2
votes1
answer1342
viewsQ: How to make a program in Java search in a certain information file and return a string
Hello. I have a program that would have to search in a text file like this: ovelha animal gato animal joão humano arvore planta I need a method, which receiving a string, evaluates based on that…
javaasked pedrocarboni 117 -
5
votes2
answers90
viewsQ: Error with Java arrays
Could someone tell me what’s wrong with this code? The result is always the first number before the space, but has to be the sum of all numbers in the array. import java.util.Scanner; public class…
javaasked pedrocarboni 117 -
4
votes1
answer1949
viewsQ: How to split a string`and then convert to int?
I have a string "1 2 3 4 5" to divide it and save the numbers in separate variables I was reading and saw that have to use a method called Split... I tried to do it, but I couldn’t. How do I do…
javaasked pedrocarboni 117