Is this valid Java code? My teacher claims it is, but I'm really not so sure.

Posted by Sergio Tapia on Stack Overflow See other posts from Stack Overflow or by Sergio Tapia
Published on 2010-05-11T16:39:30Z Indexed on 2010/05/11 16:44 UTC
Read the original article Hit count: 342

Filed under:
|
|

Granted he didn't show us actual code here, just mentioned it, I found it extremely bizarre.

For example, according to what he said this is valid Java:

public class Person
{
    String Name;
    int Age;

    {
        //These two braces just chilling together - VALID? :O
    }
}

© Stack Overflow or respective owner

Related posts about java

Related posts about beginner