Search:

Type: Posts; User: CodeBro

Search: Search took 0.11 seconds.

  1. Re: Why does my code throw an exception when there aren't square brackets around the delimiter for the String split method?

    The statement at line 8 is:

    String[] array2 = str2.split("?", 0);
  2. Re: Why does my code throw an exception when there aren't square brackets around the delimiter for the String split method?

    Here is the program:



    import java.util.Arrays;
    public class Program {
    public static void main(String[] args) {
    String str = "22-22";
    String str2 = "33?33";
    String str3 = "12,12";
  3. Re: Why does my code throw an exception when there aren't square brackets around the delimiter for the String split method?

    This is the full error message:



    Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0
    +-x/doubleintarclg
    ^
    at...
  4. Why does my code throw an exception when there aren't square brackets around the delimiter for the String split method?

    I am currently trying to make a calculator in Java. I want to use the String split method to tokenize the string of characters inputted. I thought I was using the String split method wrongly, because...
Results 1 to 4 of 4