📜 ⬆️ ⬇️

You're not a compiler

At conferences, gifts are often distributed at stands. Usually you need to solve some kind of puzzle.

Innocent puzzle


Some of the tasks involve solving a puzzle with code like this:

What will be the result of the following code:
')
public class Sum {

    public static void main(String[] args) {
        System.out.println(0123 + 3210);
    }
}

  1. 3293
  2. 3333
  3. IllegalArgumentException

— , , , , ( Google). , -.

,


— , . .

, . , «» . , .

, - . , IDE Google, . ? , . , : ! , .


, :

service() javax.servlet.http.HttpServlet?

  1. public void service(ServletRequest, ServletResponse)
  2. public void service(HttpServletRequest, HttpServletResponse)
  3. public int service(ServletRequest, ServletResponse)
  4. public int service(HttpServletRequest, HttpServletResponse)
  5. protected void service(ServletRequest, ServletResponse)
  6. protected void service(HttpServletRequest, HttpServletResponse)
  7. protected int service(ServletRequest, ServletResponse)
  8. protected int service(HttpServletRequest, HttpServletResponse)

, IDE JavaDoc.

. « , ».


, . ? . , , , , IDE, , Google .


.

, , . . . .

? , , . — Java EE Enterprise Architect. , .

. . , : . , -.


, , - . , , . , . .

Source: https://habr.com/ru/post/336838/


All Articles