java經典面試題

2021-09-24 15:41:59 字數 1178 閱讀 2916

string str = "abcdesjkjsadfoiqwejhjkahjsiuhaskhka";

int counter = new int[26];

for(int i=0; i經典面試題目:

int n = 5;

for(int i = 0; i<5; i++)

system.out.println(n);//5

解析:

n = 5;

n = n++;

// 規則: ++ 的有限遠遠高於賦值運算=,++先計算

// 1. 計算++(後++):

// 1. 先取出n的值5作為 n++ 表示式的值5

// 2. 將n的值增加1, n為6

// 2. 計算賦值 =, 將 n++ 的值5 賦值給n,n改變為5

分析:

n = 726633

l = n%10; //3

n /= 10; //72663

l = n%10; //3

n /= 10; //7266

l = n%10; //6

n /= 10; //726

l = n%10; //6

n /= 10; //72

l = n%10; //2

n /= 10; //7

l = n%10; //7

n /= 10; //0

**:

int n = 703383;

int digi=new int[10];

int i = digi.length-1;

dowhile(n!=0);

int nums = new int[digi.length-1-i];

system.arraycopy(digi, i+1, nums, 0, digi.length-1-i);

system.out.println(arrays.tostring(nums));

int ary = ;

for(int i=ary.length-1; i>0; i--)

system.out.println(arrays.tostring(ary));

經典JAVA面試題

建立 tcp ip 連線 三次握手具體過程 由瀏覽器傳送乙個 http 請求 經過路由器的 通過伺服器的防火牆,該 http 請求到達了伺服器 伺服器處理該 http 請求,返回乙個 html 檔案 瀏覽器解析該 html 檔案,並且顯示在瀏覽器端 這裡需要注意 2.事務的併發問題有哪幾種?答 丟失...

經典Java面試題 Spring AOP

面試原題 action類的定義如下 為該類的actionsomething方法定義的切面攔截如下 請問在執行action物件的actionsomething 時的輸出是什麼?a.123456 b.654321 c.521643 d.521463 正確答案 c 面試技術點 spring aop定義以及...

java 經典多點面試題

以下知識點包含哪幾部分 public class test public void run start 1.匿名內部類 new runnable 必須繼承乙個父類或實現乙個介面 runnable是乙個介面 new thread new runnable 2.物件呼叫成員方法 簡化相當於 new th...