public class Parameteruebergabe { public static void main(String[] args) { Ball meinBall = new Ball(); System.out.println("Ball vor dem Wandel: " + meinBall.typ); // Handball wandel(meinBall); System.out.println("Ball vor dem Wandel: " + meinBall.typ); // Golfball } private static void wandel(Ball ball){ ball.typ = "Golfball"; ball = null; } } class Ball { String typ = "Handball"; }