我首先创建了一个类:我正在学习Apex代码中的面向对象概念,并且不断获得“变量不存在:名称”。我在做什么错?
public class Dog
{
public String name;
public integer age;
public void disp()
{
system.debug('Name of my dog '+name);
system.debug('Age of my dog '+age);
}
}
我的Apex代码:
Dog d1=new Dog();
d1.name='scooby';
d1.age=12;
d1.disp();
Dog d2=new Dog();
d2.name='tiger';
d2.age=13;
d2.disp();