Computer Science · Java Programming
Consider the following recursive function F() in Java: public static String F(int N) { if (N <= 0) return "-"; return F(N - 3) + N + F(N - 2) + N; } What is the value returned by the call F(5)?
- 1-2-25-3-1-135✓
- 2-1-145-2-245
- 3-2-25-1-3-135
- 4-2-25-3-135
Correct answer
-2-25-3-1-135
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Java Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Java Programming