Consider the following recursive function F() in Java that takes an integer value and returns a string value : public static String F(int N) { if ( N <= 0) return "-"; return F(N - 3) + N + F(N - 2) + N; } The value of F(5) is :
Step 1: The base case returns “-”. Hence F(1) = “-1-1” and F(2) = “-2-2”.
Step 2: F(3) = F(0) + “3” + F(1) + “3” = “-3-1-13”.
Step 3: F(5) = F(2) + “5” + F(3) + “5” = “-2-25-3-1-135”. Concatenation proceeds from left to right because the first operand is a string.
Arrange the following applet life cycles methods in sequence
A. start()
B. paint()
C. init()
D. stop()
Choose the correct answer from the options given below:
A java program that is embedded in HTML document and runs in the context of java capable browser is known as ______.
JAVA compiler translates source code into _______.
Which of the following statement(s) is/are correct regarding java programming?
I. Place a semicolon immediately after a method header
II. Define a method outside the braces of a class definition
The application in java, which is used for sending small applications to run at client side is __________.