swift中可以得到一个class的属性名吗

2025-04-08 09:11:23
推荐回答(1个)
回答1:

public class point { private float x;// private float y;// public point(float x,float y) { this.x=x; this.y=y; } } public static void main(String[] args) { point p = new point(3.5,2.8); float a = p.x;// }