Guest User

Untitled

a guest
Nov 8th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | Source Code | 0 0
  1. public class Test1 {
  2.     public static void main(String[] args) {
  3.         int i = new Test2().getI();
  4.     }
  5. }
  6. public class Test2 {
  7.     private int i = 5;
  8.     public int getI() {
  9.         return this.i;
  10.     }
  11. }
  12.  
  13. public class Test3 {
  14.     public static void main(String[] args) {
  15.         int i = Test4.getI();
  16.     }
  17. }
  18. public class Test4 {
  19.     private static int i = 5;
  20.     public static int getI() {
  21.         return this.i;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment