package six; class A { public static void main(String[] args) { // TODO Auto-generated method stub } } class B{ public static void ay (double Pi, double Radius, double Height){ System.out.println(Pi*Radius*Radius*Height); } }
Quote: need to know how to access variable Pi in class A and set it to 3.142
B.ay(3.142, 10.0, 10.0);
public static void main(String[] args) { loop(more to process) { read radius read height call B.ay(pi, radius, height); do you want to process more? } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)