Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ProbvamMetod {
- public double[] myList;
- public ProbvamMetod(double[] myList)
- {
- for(int i = 0; i<myList.length; i++)
- this.myList[i] = myList[i];
- }
- public String toSstring(){
- StringBuffer sb = new StringBuffer("[");
- for (double oneInt : myList) {
- sb.append(oneInt);
- sb.append(", ");
- }
- sb.append(" ]");
- return sb.toString();
- }
- public static void main(String [] args)
- {
- ProbvamMetod pm = new ProbvamMetod(new double[]{5,2,3,7});
- pm.toSstring();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement