導航:首頁 > 編程語言 > js轉java

js轉java

發布時間:2023-08-09 16:26:39

① js轉java代碼

package p1;

import java.util.Arrays;
import java.util.LinkedList;

public class Guy
{
public static void recursionSub ( LinkedList<int[]> list, int count, int[] array, int ind, int start, int... indexs )
{
start++;
if (start > count - 1)
{
return;
}
if (start == 0)
{
indexs = new int[array.length];
}
for ( indexs[start] = ind; indexs[start] < array.length; indexs[start]++ )
{
recursionSub (list, count, array, indexs[start] + 1, start, indexs);
if (start == count - 1)
{
int[] temp = new int[count];
for ( int i = count - 1; i >= 0; i-- )
{
temp[start - i] = array[indexs[start - i]];
}
list.add (temp);
}
}
}

public static void main ( String[] args )
{
int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
LinkedList<int[]> list = new LinkedList<int[]> ();
recursionSub (list, 3, array, 0, -1);
for ( int[] strings : list )
{
System.out.println (Arrays.toString (strings));
}
}
}

② js正則轉java正則怎麼轉

js正則轉java:你應該是想知道js正則表達式,在java里怎麼寫吧。
舉例:String strRegex = "^[1][3,4,5,8][0-9]{9}$";校驗手機號碼
String str = "13977895777";
str.matches(strRegex );

閱讀全文

與js轉java相關的資料

熱點內容
阿里程序員績效錄入 瀏覽:382
eb蜜罐原理及源碼 瀏覽:803
命令界面怎麼調大小 瀏覽:890
公共測試伺服器做什麼的 瀏覽:746
湖南網路伺服器雲空間 瀏覽:365
做博客需要什麼app 瀏覽:548
查看網站編程語言 瀏覽:302
我的世界伺服器的密碼怎麼弄 瀏覽:644
電腦文件夾如何傳輸視頻不壓縮 瀏覽:145
安卓對單片機編程 瀏覽:728
被加密的txt 瀏覽:927
單片機匯編調用子程序 瀏覽:253
小米定位伺服器地址 瀏覽:612
有什麼好的學畫app 瀏覽:882
5線4相步進電機單片機控制 瀏覽:293
linux重啟php命令行 瀏覽:999
加密軟體gif 瀏覽:761
取字元串的前幾位java 瀏覽:312
車銑復合雕花編程教學 瀏覽:904
android圖片等比例縮放 瀏覽:355