博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
0115 创建类并调用
阅读量:5153 次
发布时间:2019-06-13

本文共 2395 字,大约阅读时间需要 7 分钟。

public class HUAWEI{                             //创建类    String pinpai;        String xinghao;        String yanse;        int neicun ;        int cpu ;        double pingmuchicun;        double shijian ;         int xiangsu ;

 

public class HV {    public static void main(String[] args) {                                                                  //调用类                 HUAWEI P8 = new HUAWEI();                        HUAWEI Mates = new HUAWEI();                        HUAWEI Mate8 = new HUAWEI();                        P8.pinpai = "华为 P8max";                        Mates.pinpai = "华为 Mates";                        Mate8.pinpai = "华为 Mate8 ";                        P8.neicun = 32;                        Mates.neicun = 32;                        Mate8.neicun = 64;                        P8.pingmuchicun  = 6.8;                        Mates.pingmuchicun = 5.5;                        Mate8.pingmuchicun = 6.0;                        P8.xiangsu = 13000000;                        Mates.xiangsu = 13000000;                        Mate8.xiangsu = 16000000;                        P8.xinghao = "华为 P8max DAV-706L 标配版双4G(日晖金)";                        Mates.xinghao = "华为Mate S(CRR-UL00)标配版 双4G(星辰银)";                        Mate8.xinghao = "HUAWEI NXT-AL10";                        P8.yanse = "金色";                        Mates.yanse = "银色";                        Mate8.yanse = "香槟金";                        P8.shijian =  2015;                        Mates.shijian  =  2015;                        Mate8.shijian = 2015.11;                        P8.cpu = 8;                        Mates.cpu = 8;                        Mate8.cpu = 8;                        System.out.println("品牌:"+P8.pinpai+"型号:"+P8.xinghao+"上市时间:"+P8.shijian+"\t"+            "颜色:"+P8.yanse+"CPU核数"+P8.cpu+"内存:"+P8.neicun+"屏幕尺寸:"+P8.pingmuchicun+"像素:"+P8.xiangsu);                        System.out.println("品牌:"+Mates.pinpai+"型号:"+Mates.xinghao+"上市时间:"+Mates.shijian+"\t"+                    "颜色:"+Mates.yanse+"CPU核数"+Mates.cpu+"内存:"+Mates.neicun+"屏幕尺寸:"+Mates.pingmuchicun+"像素:"+Mates.xiangsu);                                System.out.println("品牌:"+Mate8.pinpai+"型号:"+Mate8.xinghao+"上市时间:"+Mate8.shijian+"\t"+                    "颜色:"+Mate8.yanse+"CPU核数"+Mate8.cpu+"内存:"+Mate8.neicun+"屏幕尺寸:"+Mate8.pingmuchicun+"像素:"+Mate8.xiangsu);                                }

 

 

转载于:https://www.cnblogs.com/sjxx/p/5134381.html

你可能感兴趣的文章
使用jQuery获取GridView的数据行的数量
查看>>
通用DbContext封装
查看>>
三,springboot集成mybatis
查看>>
代码实现:输入某年某月某日,判断这一天是这一年的第几天?
查看>>
理解RESTful架构
查看>>
struct、union、enum and sizeof
查看>>
HDU 2604 Queuing(矩阵高速幂)
查看>>
Session优缺点
查看>>
集成activiti-modeler 到 自己的业务系统
查看>>
[CareerCup] 14.1 Private Constructor 私有构建函数
查看>>
Qt Package Project 打包发布程序
查看>>
[LeetCode] 380. Insert Delete GetRandom O(1) 常数时间内插入删除和获得随机数
查看>>
silverlight计时器
查看>>
字符串处理函数和函数
查看>>
C++模板学习:函数模板、结构体模板、类模板
查看>>
2015/8/29 Python基础(3):数值
查看>>
Ora-19804: Cannot reclaim 45561856 bytes disk space from 8589934592 limit
查看>>
自己定义控件-仿iphone之ToggleButton&VoiceSeekBar
查看>>
正则表达式
查看>>
Android点击效果
查看>>