Can you guys help me out? My code seems to be printing the same output, no matter what I input. Here is the code,
import java.util.Scanner;
public class Assign4 {
public static void...
Type: Posts; User: Nuggets
Can you guys help me out? My code seems to be printing the same output, no matter what I input. Here is the code,
import java.util.Scanner;
public class Assign4 {
public static void...
What's the difference between these two then if both return an integer?
public int indexOf(int ch)
Returns the position of the first occurrence of the specified character.
public int...
It's a program to check if an inputted variable name is proper or not. If the user enters say "street address", then the output should read "Illegal" because of the space.
*Edit. My book does say...
When I try and use " ", it gives me an error.
String variableName1 = variableName.indexOf(" ");
Hows it going guys? Nuggets is back with another simple question for you java gurus here. The question is this.
How would I return a space that has been entered as input using the indexOf method?...