Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test{
- int a;
- public int b;
- private int c;
- void setc(int i){
- c=i;
- }
- int getc(){
- return c;
- }
- }
- class test2{
- //you can take this class or you can delete it
- }
- class Bank{
- public static void main(String args[]){
- Test ob = new Test();
- ob.a=15;
- ob.b=20;
- ob.setc(100);
- System.out.println("a, b, and c: "+ob.a+" "+ob.b+" "+ob.getc());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement