随笔分类 - Java / this
摘要:package com.thisDemo; public class Student { double score; public void prinThis(){ System.out.println(this); } public void printPass(double score){ if
阅读全文
摘要:package com.thisDemo; //掌握this应用 //this有啥应用场景:主要用来解决变量名称冲突问题 public class thisDemo { public static void main(String[] args) { Student s1=new Student()
阅读全文
摘要:package com.encapsulation; public class Student { private double score; public void setSore(double score){ if (score>=0 && score<=100){ this.score=sco
阅读全文