DevJourney

Java/Basics/expressions.java

package Java.Basics;

public class expressions {

    public static void main(String[] args) {
        
        double friends = 10;
        friends = friends + 1;
        System.out.println(friends);
        friends++;
        System.out.println(friends);
        friends--;
        System.out.println(friends);
        
        double cake = 1;
        double cakeperfriends = (double)  cake / friends;
        System.out.println(cakeperfriends);
    }
    
}
View on GitHub