Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created July 6, 2026 15:33
Show Gist options
  • Select an option

  • Save thinkphp/ea7eb20e240a1302081b9c886df0e6ce to your computer and use it in GitHub Desktop.

Select an option

Save thinkphp/ea7eb20e240a1302081b9c886df0e6ce to your computer and use it in GitHub Desktop.
Clasa interioara
class Car {
private String model = "TESLA";
class Engine { //clasa interioara
void start() {
System.out.println("MOtorul porneste pentru " + model);
}
}
}
public class MainInterior {
public static void main(String[] args) {
Car car = new Car();
Car.Engine engine = car.new Engine();//sintaxa speciala
engine.start();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment