0

Why this program showing error?plzzz solve my error

class box { double l,b,h,v; void input(double x,double y,double z) { l= x; b= y; h= z; } void vol() { v= (l*b*h); } } class cylinder { double r,h,v; void input(double x,double y) { r= x; h= y; } void vol { v= 3.14*r*r*h; } } class computevol { static void addvol(box v1,cylinder v2) { computevol ob= new computevol(); ob.v= v1.v+v2.v; System.out.println(ob.vol); } public static void main(String args[]) { box b1= new box(); b1.input(4.0,2.0,1.0); b1.vol(); cylinder b2= new cylinder(); b2.input(3.0,7.0); b2.vol

16th Jun 2018, 3:03 AM
Sandeep Awasthi
Sandeep Awasthi - avatar
5 odpowiedzi
+ 2
Sandeep Awasthi https://code.sololearn.com/c6g1Lq7H3FrJ/?ref=app i correct your error this mighy help you
16th Jun 2018, 6:53 AM
Arun Tomar
Arun Tomar - avatar
+ 1
most of them are syntax errors make sure that you close all open braces and some missing semicolon and invalid function calls
16th Jun 2018, 3:06 AM
‎ ‏‏‎Anonymous Guy
16th Jun 2018, 3:07 AM
Sandeep Awasthi
Sandeep Awasthi - avatar
+ 1
Sandeep Awasthi line no. 32: remove it and add this double vol; line no. 34: remove ob from println function
16th Jun 2018, 3:16 AM
‎ ‏‏‎Anonymous Guy
0
no of palindrome in the sentence
6th May 2019, 9:41 AM
Sandeep Awasthi
Sandeep Awasthi - avatar