daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Oct 21st, 2018 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class scope{
  2.     public static int  k = 3;
  3.     public static int function1(){
  4.         int x = 1;
  5.         return x;
  6.     }
  7.  
  8.     public static void main(String[] args){
  9.         System.out.println(k);
  10.         System.out.println(function1());
  11.         System.out.println(scope2.function2());
  12.         System.out.println(scope2.function3());
  13.         scope2 instancescope = new scope2();
  14.         System.out.println(instancescope.getInitial());
  15.         instancescope.setInitial("K");
  16.         System.out.println(instancescope.getInitial());
  17.    
  18.     }
  19. }
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