(20) What will be the output for
the following statement ?
System.out.println( 15/4);
Answers
Answered by
0
Explanation:
class point{
int p,q;
point(int p, int q){
this.p=p; this.q=q;
}
void printpoint(){
System.out.println(this.p+" "+this.q);
}
}
class q1b{
public static void origin1(point p){
p = new point(0,0);
}
public static void origin2(point p){
p.p=15;
p.q=20;
}
public static void main(String args[]){
point q = new point(10,66);
origin1(q);
q.printpoint();
origin2(q);
q.printpoint();
Similar questions