Question d’entretien chez eBay

Convert a string to an integer, and some jQuery commands. Not bad.

Réponses aux questions d'entretien

Utilisateur anonyme

20 juill. 2015

Answer to convert a string to command in a C style language (This syntax is closest to Java): String string1 = "12345"; int num = 0; for (int i = 0; i < string1.size(); i++) { num = num * 10 + valueof(string1[i]); }

1

Utilisateur anonyme

15 avr. 2016

private static long getInteger(String sno) { int length = sno.length(); long ino = 0, temp=0; for(int i=0; i< length; i++) { temp = (sno.charAt(i)-'0'); ino = ino*10 + (temp); } return ino; }