Java Error When correct code is put together
- by Eric
I have a few string problems that I need to put together for a complete homework assignment. They all work correctly by themselves, but when I put them together in the main function, the last one that finds the smallest word in a string gives an error. Anyone know why?
public static void main(String[] args){
Scanner sc = new…