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

制作于2018年2月8日

价格 免费

//一个;结束代表一个语句

//游戏中主角的血量

//   =表示赋值

int   hp=100;

System.out.println("hp");

System.out.println(hp);

hp =90;

System.out.println(hp);

[展开全文]

str.trim()//适用于网站密码,去前后空格.

[展开全文]

s.equals(String str);判断str与s的字符串是否相等.

==比较的是字符串的引用

s.equalsIgnoreCase(String str);忽略大小写比较字符串

compareTo()String str);//用于

[展开全文]

str1.indexOf("edu");//查找子字符串的起始位置

str1.indexOf(int I);//查找对应位置的字符

str1.lastindexOf("edu");//从后往前查找子字符串的起始位置

str1.charAt(0);//访问第一个位置的字符;

str1.substring(4,7);//截取指定位置的字符串

 

[展开全文]

math.random()*1000(生成一千以内的整数)

[展开全文]

Ctrl+N=新建文本

Ctrl+Z=取消上一步操作

Ctrl+S=保存

[展开全文]

public class IfDemo {
    public static void main (String[] args) {
        
        int hp=13413;
        if(hp<=0){
        System.out.println("Game over");
        } else {System.out.println("You win");
        }
    }
    }

[展开全文]

import java.util.Scanner;

import java.util.Arrays;

public class

[展开全文]

import java.util.Arrays;

import java.util.Scanner;

int [][] a=new int[][];

int [][] a;

a=new int[][];

 

[展开全文]

import java.util.Scanner;

public class MYin{

public}

[展开全文]

import java.util.Scanner;

Scanner.myin=new Scanner(System.in);

 

in wo=myin.nextInt();

System.out.println(wo);

[展开全文]

import java.until.Scanner;

Scanner s=new Scanner(System.in);

int newwo=s.nextInt()public class

 

[展开全文]

import java.util.Scanner;

Scanner myin=new Scanner(System.in);

 

[展开全文]

import java.util.Scanner;

Scanner myin=new Scanner(System.in);

int newword=myin.nextInt();

 

[展开全文]

import java.util.Scanner

Scanner.myin=new Scanner(System.in);

int 

 

[展开全文]

授课教师

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

课程特色

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