There is a class Cars
package sample.cars; public class Cars { public static void main(String[] args) { Car chevrolet = new Car(); } } And Car class
package sample.cars; public class Car { //Как сделать так чтобы можно было не называть класс при создании объекта class Motor { public boolean isElectro = false; } } And I don't need to call the nested class inside the main method. And just refer to the class Motor for the very name of the class ie. so chevrolet.Motor.isElectro
static class Motor {? - gil9red