導航:首頁 > 編程語言 > 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相關的資料

熱點內容
安卓手機製表怎麼換行 瀏覽:203
牆柱搭接箍筋怎麼加密 瀏覽:444
怎麼加密不讓人打開 瀏覽:323
2g3g演算法 瀏覽:194
python可以在net開發 瀏覽:922
編程里的hr啥意思 瀏覽:399
上海php兼職 瀏覽:716
順豐app如何驗證學生 瀏覽:368
伺服器mac地址過濾器 瀏覽:929
程序員一年內被開除 瀏覽:452
福建文檔課件加密企業 瀏覽:777
appstore美國的界面怎麼看呀 瀏覽:521
hlt單片機 瀏覽:312
CA的命令 瀏覽:680
安卓怎麼傳王者應用給蘋果 瀏覽:910
aws雲伺服器自建 瀏覽:828
如何更換伺服器登錄網站 瀏覽:689
java修改ip地址 瀏覽:827
java操作cookie 瀏覽:687
ping命令2個ip 瀏覽:222