Answers for "Array List java can I add a pair of element"

0

Array List java can I add a pair of element

MyClass pair = new MyClass(2.5,3.5);
shapes.add(pair);
Posted by: Guest on February-22-2022
0

Array List java can I add a pair of element

public class MyClass {
   double x;
   double y;
   public MyClass(double x, double y) {
      this.x = x;
      this.y = y;
   }
}
Posted by: Guest on February-21-2022

Code answers related to "Array List java can I add a pair of element"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language