當前位置:首頁 » 編程語言 » java33

java33

發布時間: 2023-03-20 11:14:39

㈠ 33歲了,轉行學java,靠譜嗎

個人覺得不靠譜,IT這個行業現在年齡限制很大。而且學Java不是一天兩天就能學會的,就算學得好也要5個月左右,技術這個東西也是需要不斷地學習才能更上時代的更新速度,否則只能被企業淘汰。
現在企業招聘Java人才也是非常看重年齡和經驗的,像你這樣33歲才學出來的話,幾乎沒有企業是願意錄取你的,所以轉行一定要慎重。

㈡ 請問用java從1-33個整數中隨機抽取6個數字 且不重復 1-16隨機抽取一個數,給小球

完整代碼為:

public class Main {

public static void main(String[] args) {
int index = 1;
int[] redBalls = new int[6];

Random random = new Random();
boolean getMoreRed = true;
boolean getAgain;
System.out.println("開始抽取紅球!");
while (getMoreRed) {
getAgain = false;
int red = random.nextInt(36) + 1;
System.out.print("本次抽取到的紅球為:[" + red + "]!");
for (int i = 0; i < index; i++) {
if (redBalls[i] == red) {
System.out.print("重復抽取,將重新抽取紅球");
getAgain = true;
break;
}
}
System.out.println("");
if (getAgain){
continue;
}
redBalls[index - 1] = red;
index++;
getMoreRed = index < 7;
}
System.out.println("抽取到的紅球為:");
Arrays.sort(redBalls);
for (int redBall : redBalls) {
System.out.print(redBall + " ");
}

System.out.println(" 開始抽取藍球!");
System.out.println("本次抽取到的藍球為:[" + (random.nextInt(16) + 1) + "]!");
}
}

熱點內容
河南科技大學期末編譯原理試題 發布:2025-07-12 19:53:17 瀏覽:46
電腦中的微信聊天記錄在哪裡存儲 發布:2025-07-12 19:47:22 瀏覽:944
蘋果6sp怎麼設置密碼 發布:2025-07-12 19:28:50 瀏覽:547
電視下架緩存的還能看嗎 發布:2025-07-12 19:14:12 瀏覽:444
安卓平板微軟平板和蘋果哪個好 發布:2025-07-12 19:09:37 瀏覽:413
資料庫地區 發布:2025-07-12 19:05:41 瀏覽:395
如何檢查vds腳本 發布:2025-07-12 19:04:24 瀏覽:909
命令行編譯vs2013 發布:2025-07-12 19:01:22 瀏覽:808
c語言輸出所有素數 發布:2025-07-12 19:01:19 瀏覽:659
查電費賬號密碼多少 發布:2025-07-12 18:56:19 瀏覽:545