13450人加入学习
(67人评价)
Java编程学习第一季

制作于2018年2月8日

价格 免费

正数反码补码原码都一样

负数原码,反码符号位不变、其他位不变,

补码码符号位不变、其他位不变,末尾加1

9

原码:00000000 00000000 00000000 00001001

反码:

00000000 00000000 00000000 00001001

补码:

00000000 00000000 00000000 00001001

-9

原码:10000000 00000000 00000000 00001001

反码:

11111111 11111111 11111111 11110110

补码:

11111111 11111111 11111111 111101101

 

[展开全文]

1234

BGHD

int,byte,short,long,float,double,

char,boolean,

6种

 

[展开全文]

dlkclo活动时间很多客户数控刀具2ksjkdjkjs

[展开全文]

~12(8(*9;'[kdsjfkjeljijkjkSJ;Lf;jlJf;jfkJuejlJlfjlJjejkejifsijfjj*&&*&^&*^**&&&$$$$$$$$$fflk5%&8(08(**(***^&$%^$ dkks<>》

[展开全文]

八kwjdkj's;;'  ^&*&^^%(**(&*&*(&(*(*(whritehellohellofuckmotherfather

[展开全文]

1-如何接收用户键盘输入的数据

import java.util.Scanner;

 

Scanner s = new Scanner(System.in);

s.nextInt();

[展开全文]

1-break的第一个作用:用来跳出switch语句

2-break的第二个作用:用来跳出循环

[展开全文]

1-

for 循环适用于已知要循环的顺序

while循环适用于已知循环的条件

[展开全文]

import java.util.Scanner;

Scanner  s = new Scanner(System.in);

s.nextInt();

[展开全文]

continue 中断当前循环,继续执行后续循环,只用于循环中。

break跳出当前最近的循环,后续都不再执行。

return可以yong

[展开全文]

特殊的用法:
if()
Xxx;
Xxx;

public class IfDemo{
	public static void main(String[] args){
		int hp = 3;
		if(hp<=0)
			System.out.println("已经死亡");//if语句判定条件
			System.out.println("GameOver");
		
		//if(hp<=0){
			//System.out.println("已经死亡");
		//}else{
			//System.out.println("还活着");
		//}
		//if(hp>0){
			//System.out.println("还活着");
		//}0-1000 
		//0-100 D 
		//101-300 C
		//301-500 B
		//501-600 A
		//601-700 S
		//701-800 SS
		//801-1000 SSS
		int score = 800;
		if(score >= 0 && score<=100 ){
			System.out.println("你获得的评级是:D");
		}
		if(score >= 101 && score<=300 ){
			System.out.println("你获得的评级是:C");
		}
		if(score >= 301 && score<=500 ){
			System.out.println("你获得的评级是:B");
		}
		if(score >= 501 && score<=600 ){
			System.out.println("你获得的评级是:A");
		}if(score >= 601 && score<=700 ){
			System.out.println("你获得的评级是:S");
		}if(score >= 701 && score<=800 ){
			System.out.println("你获得的评级是:SS");
		}if(score >= 801 && score<=1000 ){
			System.out.println("你获得的评级是:SSS");
		}
		
	}
}


if();

public class IfDemo{
	public static void main(String[] args){
		int hp = 3;
		if(hp<=0);//此时if语句为结束语句
			System.out.println("已经死亡");
			System.out.println("GameOver");
		
		//if(hp<=0){
			//System.out.println("已经死亡");
		//}else{
			//System.out.println("还活着");
		//}
		//if(hp>0){
			//System.out.println("还活着");
		//}0-1000 
		//0-100 D 
		//101-300 C
		//301-500 B
		//501-600 A
		//601-700 S
		//701-800 SS
		//801-1000 SSS
		int score = 800;
		if(score >= 0 && score<=100 ){
			System.out.println("你获得的评级是:D");
		}
		if(score >= 101 && score<=300 ){
			System.out.println("你获得的评级是:C");
		}
		if(score >= 301 && score<=500 ){
			System.out.println("你获得的评级是:B");
		}
		if(score >= 501 && score<=600 ){
			System.out.println("你获得的评级是:A");
		}if(score >= 601 && score<=700 ){
			System.out.println("你获得的评级是:S");
		}if(score >= 701 && score<=800 ){
			System.out.println("你获得的评级是:SS");
		}if(score >= 801 && score<=1000 ){
			System.out.println("你获得的评级是:SSS");
		}
		
	}
}


注意事项
三元运算符可以实现的都可以使用if语句代替
区别:
三元运算符比较简洁
三元运算符必须返回结果
if语句可以执行多条语句
 

public class IfDemo{
	public static void main(String[] args){
		//int hp = 3;
		//if(hp<=0);
			//System.out.println("已经死亡");
			//System.out.println("GameOver");
		
		//if(hp<=0){
			//System.out.println("已经死亡");
		//}else{
			//System.out.println("还活着");
		//}
		//if(hp>0){
			//System.out.println("还活着");
		//}0-1000 
		//0-100 D 
		//101-300 C
		//301-500 B
		//501-600 A
		//601-700 S
		//701-800 SS
		//801-1000 SSS
		/*
		int score = 800;
		if(score >= 0 && score<=100 ){
			System.out.println("你获得的评级是:D");
		}
		if(score >= 101 && score<=300 ){
			System.out.println("你获得的评级是:C");
		}
		if(score >= 301 && score<=500 ){
			System.out.println("你获得的评级是:B");
		}
		if(score >= 501 && score<=600 ){
			System.out.println("你获得的评级是:A");
		}if(score >= 601 && score<=700 ){
			System.out.println("你获得的评级是:S");
		}if(score >= 701 && score<=800 ){
			System.out.println("你获得的评级是:SS");
		}if(score >= 801 && score<=1000 ){
			System.out.println("你获得的评级是:SSS");
		}
		*/
		int a = 9 ,b =20;
		int max = a>b?a:b;
		if(a>b){
			max = a;
		}else{
			max=b;
		}
	}
}

 

[展开全文]

授课教师

问问题加入A计划,有专门负责答疑的老师哦!!!

课程特色

下载资料(1)
视频(98)