javau3p8

import java.util.*; class pare { private double w,o; public void setdatat(double q,double m) { w=q; o=m; } public double getl() { return(w); } public double getb() { return(o); } } public class pro38 extends pare { private double l,b,h,f,g; public void setdata(double l,double b,double h) { this.l=l; this.b=b; this.h=h; } public void show() { f=getb(); g=getl(); System.out.println(f); System.out.println(g); System.out.println(l); System.out.println(b); System.out.println(h); } public static void main(String ar[]) { pro38 obj=new pro38(); obj.setdatat(12,12); obj.setdata(1,1,1); obj.show(); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.