对象的使用方法使用对象调用变量和函数:对象.变量 对象.函数()例如创建一个Dog类并使用对象//类文件Dogclass Dog{ String name;//首字母要大写 int age; String color; void jump(){ System.out.println("jump".....
分类:
其他好文 时间:
2014-10-22 23:29:43
阅读次数:
228
一:1 public aspect MyAspect {2 pointcut move():3 call(void Point.setX(int));4 before(): move() {5 System.out.println("before ca...
分类:
Web程序 时间:
2014-10-22 23:20:05
阅读次数:
297
1 闭包 var a = 3 var addfun = (x:Int) => x + a var b = addfun(10) println(b) addfun 就是个和对象无关的函数,局部变量,使用方法和函数一样,但是好像不推荐这种写法。2 类的创建,简单使用a...
分类:
其他好文 时间:
2014-10-22 21:50:02
阅读次数:
211
//string 转 byte[]String str = "Hello";byte[] srtbyte = str.getBytes();// byte[] 转 stringString res = new String(srtbyte);System.out.println(res);//当然还...
分类:
编程语言 时间:
2014-10-22 12:16:20
阅读次数:
176
自己写浏览器和web服务器
在android写一个浏览器
editText:输入网址ip:port/login.html,提交
把域名解析成ip
产生请求行 get login.html /r/n
产生请求头 user-agent:/r/n
host:
new socket(ip,port).println(行,头)
ip[tcp[行,头]]在网络上传输到达服...
分类:
Web程序 时间:
2014-10-22 11:10:34
阅读次数:
178
class VarDemo{ public static void main(String[] args){ /*System.out.println(4); System.out.println('a');//字符System.out.println("asc");//字符串 System.out...
分类:
其他好文 时间:
2014-10-22 01:03:07
阅读次数:
154
创建类的方法: class 类名 { 属性; //也叫成员变量,用于描述类的状态 方法; //也叫成员方法,用于描述类的行为 }实际执行操作的是对象而不是类例子如下:class Person{ int age; void shout() { System.out.println("My ...
分类:
其他好文 时间:
2014-10-22 00:38:48
阅读次数:
223
packagecom.zjf;importjava.io.File;publicclassGetPath{publicstaticvoidgetPath(){//方式一 System.out.println(System.getProperty("user.dir")); //方式二 ...
分类:
编程语言 时间:
2014-10-22 00:32:37
阅读次数:
183
【适合对象】有一定编程基础的同学【情景】边看边练,多练多学,自然成长。【声明】此文章属于原创作品,未经授权,如非法转载,予以追究法律责任。练习笔记:1.var变量var str = "Hello, playground"println(str) 2.if语句var a = 20if a > 10 ....
分类:
编程语言 时间:
2014-10-21 21:23:41
阅读次数:
358
在onclick()点击事件中的
// 上传地理位置
case R.id.person_up_locat:
System.out.println("====输出了。。。。====");
// startActivity(new Intent(PersonCenterActivity.this,
// AddedToolsActivity.class));
// 获取地理位置--经纬度和...
分类:
移动开发 时间:
2014-10-21 13:52:27
阅读次数:
218