SHARE
TWEET

Untitled

a guest Jan 24th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class testing_second {
  2.     private String string;
  3.     private Object NullPointerException;
  4.  
  5.     public String getString() {
  6.         return this.string;
  7.     }
  8.  
  9.     public void setString(String string) {
  10.         this.string = string;
  11.     }
  12.  
  13.     public void mostCommonChar(){
  14.         try{
  15.             if (getString()!=null){
  16.                 char i= 't';
  17.                 System.out.println("Testing Try");
  18.             }
  19.  
  20.         } catch (Exception e) {
  21.             System.out.println("Trying Exception");
  22.         }
  23.  
  24.     }
  25.     public static  void main(String args[]){
  26.         testing_second test1 = new testing_second();
  27.         test1.setString("");
  28.         test1.mostCommonChar();
  29.     }
  30. }
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