SHARE
TWEET

Untitled

a guest Apr 26th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. public class AltifLiad {
  3.  
  4.     public static void main(String[] args) {
  5.         String str="Liad Altif";
  6.         char ch = 'd';
  7.         System.out.println(IsItIn(str,ch));
  8.     }
  9.     public static boolean IsItIn(String str , char ch)
  10.     {
  11.         if (str.length()==0)
  12.             return false;
  13.            
  14.         return (IsItIn(str.substring(0,str.length()-1), ch)||str.charAt(str.length()-1)==ch);
  15.    
  16.        
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top