How to instantiate an object in java?

后端 未结 7 1074
不思量自难忘°
不思量自难忘° 2020-12-01 13:14

I\'m new in programming and I would like to know where did I go wrong in instantiating an object. Below is the code:

public class Testing{
    private int Sa         


        
7条回答
  •  时光说笑
    2020-12-01 13:52

    Well , it's easy. To you instantiate an object in Java you should to use class name and to do with that it class received a valor. For exemplo :

    ...Car c1 = new Car();

提交回复
热议问题