zoukankan      html  css  js  c++  java
  • 第十次上机

    public class Student {
        private String name ;
        private double achv;
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public double getAchv() {
            return achv;
        }
        public void setAchv(double achv) {
            this.achv = achv;
        }
        Student(){
            
        }
        Student(String name,double achv){
            this.achv=achv;
            this.name=name;
        }
        
    }
    public class Person {
        public Person() {
            System.out.println("无参的构造方法被调用了...");
        }
    }
    
    
    package fff;
    
    public class fff {
    
        public static void main(String[] args) {
            Person p1 = new Person();
        }
    
    }
    public class fff {
        private String name;
        private String color;
        public void run(){
            System.out.println("车跑的很快");
        }
        public Car() {
        }
    
        public Car(String name, String color) {
            this.name = name;
            this.color = color;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getColor() {
            return color;
        }
    
        public void setColor(String color) {
            this.color = color;
        }
    }
  • 相关阅读:
    3D 立体动态图 代码:
    自由切换 网页上的 ico 图标
    ES6 基本语法:
    JavaScript中class类的介绍
    React_01_ECMAScript6
    使用JS计算前一天和后一天
    Web 前端学习计划
    read
    java对象实例化
    关于为什么java需要垃圾回收
  • 原文地址:https://www.cnblogs.com/fff1479/p/12841962.html
Copyright © 2011-2022 走看看