Untitled

mail@pastecode.io avatar
unknown
java
2 months ago
300 B
30
Indexable
Never
public class Decrementer {
    private void decrement(double x) {
        x = x - 1.0;
    }
    public static void main(String[] args) {
        double x = 12.3;
        Decrementer decrementer = new Decrementer();
        decrementer.decrement(x);
        System.out.println(x);
    }
}
Leave a Comment