Advertisement
zomaotoko

java_220718_2

Jul 22nd, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. void share(Object obj) {
  2.     String sharedText = "";
  3.     if (obj instanceof Class1) {
  4.         // Get text
  5.     } else if (obj instanceof Class2) {
  6.         // Get Text
  7.     } else if(obj instanceof Class3) {
  8.         // Get text
  9.     } else {
  10.         // Get text for Class4
  11.     }
  12.     // Do something with sharedText
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement