运行 ❯
获取
您自己的 Java
服务器
×
更换方向
更换主题,明/暗
前往 Spaces
class Person { String fname = "John"; String lname = "Doe"; String email = "john@doe.com"; int age = 24; public static void main(String[] args) { Person myObj = new Person(); System.out.println("Name: " + myObj.fname + " " + myObj.lname); System.out.println("Email: " + myObj.email); System.out.println("Age: " + myObj.age); } }
姓名:John Doe
电子邮件:
[email protected]
年龄:24