zoukankan      html  css  js  c++  java
  • 【自动化__持续集成】___java___代码非空指针

    一、代码如下

    package www.wujianbotwo;
    
    public class Demo01 {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		People p= new People();
    		System.out.println(p.hashCode());
    		System.out.println(p);
    		People[] p2= new People[3];
    		System.out.println(p2.length);
    		System.out.println(p2.hashCode());
    		
    		
    		String[] users= new String[3];
    		System.out.println(users);
    	}
    
    }
    
    
    class People{
    	public void eat() {
    		// TODO Auto-generated method stub
    		System.out.println("吃饭");
    	}
    }
    
    package www.wujianbotwo;
    
    public class Demo01 {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		People p= new People();
    		System.out.println(p.hashCode());
    		System.out.println(p);
    		People[] p2= new People[3];
    		System.out.println(p2.length);
    		System.out.println(p2.hashCode());
    		
    		
    		String[] users= new String[3];
    		System.out.println(users);
    		String name1= new String("aaaa");
    		String name2= new String("bbb");
    		users[0]= name1;
    		users[1]= name2;
    		for(int i=0; i<users.length; i++) {
    			System.out.println(users[i]);
    		}
    	}
    
    }
    
    
    class People{
    	public void eat() {
    		// TODO Auto-generated method stub
    		System.out.println("吃饭");
    	}
    }
    
  • 相关阅读:
    Eclipse 安装配置指南
    CentOS下安装Git
    MySQL5.5在Windows下的安装
    NSInvocation调用
    动态调用
    模拟静态变量及静态类继承
    respondsToSelector判断是否实现了某方法
    JAVA闭包
    IMP获取函数指针
    [链表] 对链表与文件的结合使用的一点看法
  • 原文地址:https://www.cnblogs.com/wujianbo123/p/7491945.html
Copyright © 2011-2022 走看看