fork(1) download
  1. import java.util.Scanner;
  2.  
  3. class Student{
  4. private int rolln;
  5. private String Name;
  6.  
  7. public void setValue(int x,String name){
  8. rolln=x;
  9. Name=name;
  10.  
  11. }
  12. public void getValue(){
  13. System.out.println(rolln+""+Name);
  14. }
  15. }
  16. class Main{
  17. public static void main(String []arg){
  18. Student obj=new Student();
  19. // Student obj=new getValue();
  20. obj.setValue(3,"#bhosale");
  21. obj.getValue();
  22.  
  23. }
  24. }
Success #stdin #stdout 0.12s 55456KB
stdin
Standard input is empty
stdout
3#bhosale