Skip to content

Instantly share code, notes, and snippets.

Q1. We have a number of bunnies and each bunny has two big floppy ears. We want to compute the total number of ears across all
the bunnies recursively (without loops or multiplication).
import java.util.Scanner;
public class Q2 {
static int NumOfEars(int numOfBunnies) {
int num =0;
num = numOfBunnies + numOfBunnies;
return num;