Chinaunix首页 | 论坛 | 博客
  • 博客访问: 31326
  • 博文数量: 11
  • 博客积分: 30
  • 博客等级: 民兵
  • 技术积分: 95
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-02 14:12
文章分类

全部博文(11)

文章存档

2017年(3)

2016年(1)

2015年(5)

2014年(2)

我的朋友

分类: Java

2015-11-30 16:59:53



点击(此处)折叠或打开

  1. public class Demo{

  2.     String a = "Hello";

  3.     public Demo(String s){
  4.         System.out.println("s = " + s);
  5.         System.out.println("1 -> this.s = " + this.a);
  6.         this.a = s;
  7.         System.out.println("2 -> this.s = " + this.a);
  8.     }

  9.     public static void main(String[] args) {
  10.         Demo x=new Demo("HelloWorld!");
  11.     }
  12. }

阅读(869) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~