# Java

To use this language, use the class "language-java".

## Comments

    // Single line comment
    /* Multi-line
    comment */

## Strings

    "foo \"bar\" baz";
    'foo \'bar\' baz';

## Numbers

    123
    123.456
    -123.456
    .3f
    1.3e9d
    0xaf
    0xAF
    0xFF.AEP-4

## Full example

    import java.util.Scanner;

    public class Life {

        @Override @Bind("One")
        public void show(boolean[][] grid){
            String s = "";
            for(boolean[] row : grid){
                for(boolean val : row)
                    if(val)
                        s += "*";
                    else
                        s += ".";
                s += "\n";
            }
            System.out.println(s);
        }

        public static boolean[][] gen(){
            boolean[][] grid = new boolean[10][10];
            for(int r = 0; r < 10; r++)
                for(int c = 0; c < 10; c++)
                    if( Math.random() > 0.7 )
                        grid[r][c] = true;
            return grid;
        }

        public static void main(String[] args){
            boolean[][] world = gen();
            show(world);
            System.out.println();
            world = nextGen(world);
            show(world);
            Scanner s = new Scanner(System.in);
            while(s.nextLine().length() == 0){
                System.out.println();
                world = nextGen(world);
                show(world);

            }
        }

    	// [...]
    }

## Known failures

There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

### Comment-like substrings

    "foo /* bar */ baz"; "foo // bar";