Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.29 seconds.

  1. Re: Lazy Thursday Question: Weird Syntax You've Seen?

    Nice. Yeah, that's using an anonymous inner class along with the "initializer block" I posted in one of my examples. With formatting, that translates into this:

    import java.util.ArrayList;
    import...
  2. Re: Lazy Thursday Question: Weird Syntax You've Seen?

    Nice examples guys. I just thought of another one, referring to an outer class's "this" reference from an inner class:


    public class InnerClassTest {

    public InnerClassTest(){
    OuterClass oc...
  3. Re: Lazy Thursday Question: Weird Syntax You've Seen?

    Hahahaha. Those are awesome. I'm going to start using them as often as possible at work and just wait for a code review...
  4. Re: Lazy Thursday Question: Weird Syntax You've Seen?

    And finally, how do you create an instance of a public non-static inner class? This is how:


    public class InnerClassTest {

    public InnerClassTest(){
    OuterClass oc = new OuterClass();...
  5. Re: Lazy Thursday Question: Weird Syntax You've Seen?

    I stumbled across another example when a coworker of mine asked why his static block wasn't working (he was missing the static keyword):

    public class BlockTest {

    public static int x = 0;
    ...
  6. Lazy Thursday Question: Weird Syntax You've Seen?

    Hey all,

    We all know that Java is the best language ever and it always makes absolute syntactic and semantic sense, but occasionally I'll come across some syntax that makes me say, "huh?".
    ...
Results 1 to 6 of 6