fork download
  1. public class Main{
  2. public static void main(String[] args){
  3. A a = new A();
  4. a.B();
  5. System.out.println( a.getAlpha() );
  6. }
  7. }
  8.  
  9. class A {
  10. String a;
  11. String b;
  12. public void B() {
  13. a="hoge";
  14. b="piyo";
  15. }
  16. public String getAlpha() {
  17. return a+b;
  18. }
  19. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
hogepiyo