Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void share(Object obj) {
- String sharedText = "";
- if (obj instanceof Class1) {
- // Get text
- } else if (obj instanceof Class2) {
- // Get Text
- } else if(obj instanceof Class3) {
- // Get text
- } else {
- // Get text for Class4
- }
- // Do something with sharedText
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement