課程:《程序設計與數據結構》
班級: 1723
姓名: 王志偉
學號:20172309
實驗教師:王志強老師
實驗日期:2018年3月21日
必修/選修: 必修html
1.實驗內容java
2.實驗過程及結果git
3.實驗過程當中遇到的問題和解決過程數據結構
問題1:在使用虛擬機Jdk作例題PP3.3出現了麻煩,發現超綱!
問題1解決方案:dom
上課時老師講了一種讓咱們可以理解的方案:ide
import java.util.Random;
public class homework3_3
{
public static void main(String []args)
{
Random generator = new Random();
int a1,a2,a3,b,c,d1,d2,d3,d4,d5,e;
a1 = generator.nextInt(8);
a2 = generator.nextInt(8);
a3 = generator.nextInt(8);
b = generator.nextInt(556)+100;
d1 = generator.nextInt(10);
d2 = generator.nextInt(10);
d3 = generator.nextInt(10);
d4 = generator.nextInt(10);
System.out.print(+a1);
System.out.print(+a2);
System.out.print(+a3);
System.out.print("-"+b);
System.out.print("-"+d1);
System.out.print(+d2);
System.out.print(+d3);
System.out.print(+d4);
System.out.println("");
}
}idea
這是分割線
***************************************************************************************設計
以後學長又教了咱們一種方法:版本控制
public class telephonenumber {
public static void main(String[] args) {
DecimalFormat decimalFormat = new DecimalFormat("000");
DecimalFormat decimalFormat1 = new DecimalFormat("0000");
Random random = new Random();
int num = random.nextInt(8);
int num1 = random.nextInt(8);
int num2 = random.nextInt(8);
int num3 = random.nextInt(656);
int num4 = random.nextInt(10000);
System.out.println("電話號碼:" + num + num1 + num2 + "-" + decimalFormat.format(num3) + "-" + decimalFormat1.format(num4));
}
}orm
問題2:安裝intellj IDEA 也出現了麻煩,由於網速緣由,直接從別人電腦把整個IDEA文件拷貝到本身電腦,致使git時文件路徑不同。
問題2解決方案:
1.直接拷貝文件程序,會出現以上狀況。能夠修改文件路徑:設置》版本控制》GIt
2.能夠直接把別人的安裝包拷貝過來,以後自動匹配!!!
其餘(感悟、思考等)
參考資料
IDEA註冊碼申請 ...