大战熟女丰满人妻av-荡女精品导航-岛国aaaa级午夜福利片-岛国av动作片在线观看-岛国av无码免费无禁网站-岛国大片激情做爰视频

專注Java教育14年 全國咨詢/投訴熱線:400-8080-105
動力節點LOGO圖
始于2009,口口相傳的Java黃埔軍校
首頁 hot資訊 Java編程思想源碼

Java編程思想源碼

更新時間:2021-05-07 10:58:34 來源:動力節點 瀏覽935次

import static net.mindview.util.Print.*;
/**
 * 
 * @author duhongyu  2018年11月22日
 *
 *
 */
public class AutoInc {
	public static void main(String[] args) {
		int i = 1;
		print("i :"+i);
		print("++i"+ ++i); //Pre_increment;
		print("i++" +i++); //Post_increment;
		print("i :"+i);
		print("--i"+ --i);
		print("i--"+i--);
		print("i :"+i);				
	}
}

 

/**
 * 
 * @author duhongyu  2018年11月22日
 *
 *
 */
public class EqualsMethod {	
	public static void main(String[] args) {
		Integer  n1 = new Integer(47);
		Integer  n2 = new Integer(47);		
		System.out.println(n1.equals(n2));
	}
}

 

/**
 * 
 * @author duhongyu  2018年11月22日
 *
 *
 */
import static net.mindview.util.Print.*;
//測試對象的等價性
public class Equivalence {
	public static void main(String[] args) {		
		Integer n1 = new Integer(47);
		Integer n2 = new Integer(47);		
		print(n1==n2);		
		print(n1!=n2);				
	}
}

 

import static net.mindview.util.Print.*;
public class Literals {
 public static void main(String[] args) {
	int i1 = 0x2f;
	print("i1"+Integer.toBinaryString(i1));
	int i2 = 0X2F;
	print("i2"+Integer.toBinaryString(i2));	
	int i3 = 0177;
	print("i3"+Integer.toBinaryString(i3));	
	char  c = 0xffff;
	print("C:"+Integer.toBinaryString(c));
	byte b = 0x7f;
	print("b:"+Integer.toBinaryString(b));
	short s =0x7fff;
	print("s:"+Integer.toBinaryString(s));
	long n1 = 200L;
	long n2 = 200l;
	long n3 = 200;
	float f1 = 1;
	float f2 =1F;
	float f3 = 1f;
	double d1 = 1d;
	double d2 =1D;	 
}
}

 

import java.util.Random;
import static net.mindview.util.Print.*;
/**
 * 
 * @author duhongyu  2018年11月22日
 *
 *
 */
public class MathOps {
	public static void main(String[] args) {
		//create a seeder random number generator
		Random rand = new Random(47);		
		int i,j,k;
		//choose value from 1 to 100
		j = rand.nextInt(100)+1;
		print("j :"+j);
		k = rand.nextInt(100)+1;
		print("k :"+k);
		i = j+k;
		print("j+k:"+i);		
		i = j-k;
		print("j-k;"+i);
		i = k/j;
		print("k/j:"+i);
		i = k*j;
		print("k*j"+i);
		i = k%j;
		print("k%j"+i);
		j %= k;
		print("j % k:"+j);
		//Floating-point number tests		
		float u,v,w;
		v = rand.nextInt();
		print("v:"+v);
		w = rand.nextFloat();
		print("w"+w);
		u = v+ w;
		print("v+w:"+u);
		u = v-w;
		print("v-w:"+u);
		u = v*w;
		print("v*w:"+u);
		u = v/w;
		print("v/w:"+u);
		u+=v;
		print("u+=v:"+u);
		u-=v;
		print("u-=v:"+u);
		u*=v;
		print("u*=v:"+u);
		u/=v;
		print("u/=v:"+u);
	
	}
}

 

import static net.mindview.util.Print.*;
/**
 * 
 * @author duhongyu  2018年11月22日
 *
 *
 */
public class ShortCircult {	
	static boolean test1(int val) {
		print("test1("+val+")");
		print("result : "+(val <1 ));
		return val<1;
	}	
	static boolean test2(int val) {
		print("test2("+val+")");
		print("result : "+(val <2 ));
		return val<2;
	}	
	static boolean test3(int val) {
		print("test3("+val+")");
		print("result : "+(val <3 ));
		return val<3;
	}	
	public static void main(String[] args) {
		boolean b = test1(0)&&test2(2)&&test3(2);
		print("expression is " + b);
	}
}

 

public class test5 {	
	public static void main(String[] args) {		
		Dog dog1 = new Dog();
		dog1.name = "spot";
		dog1.says ="Ruff";
		Dog dog2 = new Dog();
		dog2.name = "scruffy";
		dog2.says = "Wurf";		
		System.out.println(	"spot.says----" +dog1.says);
		System.out.println("scruffy.says---"+dog2.says);		
	}
}
class Dog{
	String name;
	String says;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSays() {
		return says;
	}
	public void setSays(String says) {
		this.says = says;
	}
	public Dog() {
		super();
	}	
}

以上就是動力節點小編介紹的"Java編程思想源碼"的內容,希望對大家有幫助,如有疑問,請在線咨詢,有專業老師隨時為您服務。

提交申請后,顧問老師會電話與您溝通安排學習

免費課程推薦 >>
技術文檔推薦 >>
主站蜘蛛池模板: a黄毛片| 91久久综合九色综合欧美亚洲 | 四虎在线影院 | 国产真实伦偷精品 | 久久视屏这里只有精品6国产 | 不卡在线视频 | 欧美日韩中文国产一区二区三区 | 最近中文字幕在线视频1 | 欧美精品久久久久久久免费观看 | 精品国产一二三区在线影院 | 亚洲二三区 | 欧美乱xxxxx强 | 亚洲色四在线视频观看 | 射吧亚洲| 国产高清国产精品国产k | 国产成人高清 | 亚洲香蕉一区二区三区在线观看 | 国产精品精品国产一区二区 | 999精品视频在线 | 国产高清免费午夜在线视频 | www久久| 男人猛躁女人成人免费视频 | 日韩欧美视频一区二区在线观看 | 国产精品久久久久国产精品三级 | 天天干天天操天天 | 亚洲国产一区二区三区四区五区 | 国产香蕉一区二区精品视频 | 老子影院午夜伦手机在线看 | 性欧美视频 | 一级一级女人18毛片 | 图片区亚洲| 国产精品一级毛片不收费 | 欧洲色综合精品 | 中文字幕最新在线 | 国产一区二区中文字幕 | 五月天国产精品 | 黄色资源在线观看 | 性一交一乱一视频免费看 | 精品热久久 | 国产伦一区二区三区免费 | 国产精品伊人 |