For this Question: Rick's family and Jerry are playing Tic Tac Toe. Rules are simple:
<li> Game is played in pairs.
<li> If Rick plays against anyone, Rick wins.
<li> If Jerry plays against anyone, Jerry Loses.
<li> A game between any other players is a draw.
Given a pair of players, find who wins the game or if the game is draw.Input Contains two space separated characters denoting the players that will have the match.
R denotes Rick.
J denotes Jerry.
B denotes Beth.
M denotes Morty.
S denotes Summer.If the game is draw print 'D', else print the first letter of the name of the player who wins in capital.Sample Input 1
R S

Sample Output 1
R

Sample Input 2
B J

Sample Output 2
B

Sample Input 3
M S

Sample Output 3
D, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
         	BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
		String[] rowcol = rd.readLine().split(" ");
		String name = rowcol[0];
		String name2 = rowcol[1];

		if(name.equals("R")|| name2.equals("R")){
			System.out.print('R');
			return;
		}
	    	else if(name.equals("J")){
			System.out.print(name2);
			return;
		}else if(name2.equals("J")){
			System.out.print(name);
			return;
		}
		else if(!name.equals("R") && !name.equals("J")){
				System.out.print('D');
				return;
		}
		else if(!name2.equals("J") && !name2.equals("R")){
			System.out.print('D');
			return;
		}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?