Discuss / Java / 打卡

打卡

Topic source

lookphp

#1 Created at ... [Delete] [Delete and Lock User]

package oop;

public class City{
public String name;
public double latitude;
public double longitude;

public static void main(String[] args) {
City bj = new City();
bj.name = "Beijing";
bj.latitude = 39.903;
bj.longitude = 116.401;
System.out.println(bj.name);
System.out.println("location: " + bj.latitude + ", " + bj.longitude);
}

}


  • 1

Reply