大战熟女丰满人妻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毛片录 高清国产美女一级毛片 | 日本一区二区三区在线 观看网站 | 午夜精品久久久久久久99热浪潮 | 尤物福利视频 | 99久久一区| 男女一级毛片免费播放 | 久久在线免费观看 | 日本一级aaaa特黄毛片 | 久久综合香蕉 | 亚洲综合成人在线 | 久久精品只有这里有 | 香蕉18xxoo欧美夜视频 | 亚洲国产精品乱码一区二区三区 | 天天看片日日夜夜 | 国产色综合久久无码有码 | 欧美看片 | 奇米777视频二区中文字幕 | 国产成人精品免费久久久久 | 韩国爱情片免费大全 | 国产伦乱| 色综合色狠狠天天综合色hd | 老司机午夜免费 | 97在线公开视频 | 宅男噜噜噜66一区二区 | 尤物视频一区 | 99视频精品全部 在线 | 免费观看日本污污ww网站一区 | 国产波多野结衣中文在线播放 | 国产精品第一页爽爽影院 | 久久精品国产99国产精品 | 亚洲一区二区三区高清网 | 美美女高清毛片视频黄的一免费 | 一级毛片视频在线观看 | 国产精品成人观看视频免费 | 久久er热这里只有精品23 | 欧美大狠狠大臿蕉香蕉大视频 | 青青青爽国产在线视频 | 国产成人免费观看 | 中文字幕伦理聚合第一页 |