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

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

Java編程思想源碼

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

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編程思想源碼"的內容,希望對大家有幫助,如有疑問,請在線咨詢,有專業老師隨時為您服務。

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

免費課程推薦 >>
技術文檔推薦 >>
主站蜘蛛池模板: 五月婷婷综合在线视频 | 中文字幕在线看视频一区二区三区 | 久草视频播放器 | 国产精品成人不卡在线观看 | 成人夜色香网站在线观看 | 四虎8848精品永久在线观看 | 精品国产亚洲一区二区三区 | 免费中文字幕在线观看 | 欧美专区一区二区三区 | 国产精品福利自产拍网站 | 国产中文字幕免费观看 | 国产成人精品男人免费 | 91在线成人 | 黄色的网站在线观看 | 亚洲人成激情在线播放 | 久久综合色婷婷 | 免费视频亚洲 | 欧美兽皇另类 | 日本xxxx色视频在线观看免 | 就操视频| 亚洲日本欧美产综合在线 | 免费观看欧美精品成人毛片 | 中国女人内谢25xxxxx | 国产呦系列免费 | 黄色片网站在线 | 国产一级特黄a大片99 | 99久久综合狠狠综合久久 | 久艹视频在线 | 99这里 | 免费a级毛片大学生免费观看 | 国产一区精品视频 | 国产精品久久做爰 | 92福利网 | 天天拍夜夜拍 | 欧美特级毛片a够爽 | 午夜a一级毛片一.成 | 在线日韩一区 | 四虎视频国产精品免费 | 色综合久| 国产成人久久精品 | 99久久久 |