Answers for "can we create a class inside a class in java"

2

can we create a class inside a class in java

Yes you can

class OuterClass {
   class InnerClass {
   }
}
Posted by: Guest on April-09-2021
0

java class creation inside method

public class ASimplisticTCPFiniteStateMachine_FSM_ {
    public static void main(String[] args) {
        class Lmao_It_Exists {
            public void main() {
                System.out.println("Hello World");
            }
        }
        new Lmao_It_Exists().main();
    }
}
Posted by: Guest on September-02-2021

Code answers related to "can we create a class inside a class in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language