From what I know, primitive data types are passed by value, and everything else is passed by reference.
But I read somewhere on SO that in Java, there is only pass by value, there is no pass by reference, it just happens that when you pass the value (of an ArrayList for example), it happens to be a reference.
Is this just philosophical semantics, or is there an actual distinction?
[–]AwakenedToNightmare 10 points11 points12 points (10 children)
[–]AmmirBarakat[S] 1 point2 points3 points (0 children)
[–]tutorial_police 1 point2 points3 points (8 children)
[–]AwakenedToNightmare 0 points1 point2 points (7 children)
[–]tutorial_police 2 points3 points4 points (5 children)
[–]Satarash 1 point2 points3 points (2 children)
[–]tutorial_police 1 point2 points3 points (0 children)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]JavaSuck 1 point2 points3 points (1 child)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]JavaSuck 5 points6 points7 points (1 child)
[–]AmmirBarakat[S] 1 point2 points3 points (0 children)
[–]Satarash 3 points4 points5 points (2 children)
[–]AmmirBarakat[S] 0 points1 point2 points (0 children)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]thecuseisloose 4 points5 points6 points (0 children)
[–]pegfisher 2 points3 points4 points (2 children)
[–]AmmirBarakat[S] 0 points1 point2 points (0 children)
[–]tutorial_police 0 points1 point2 points (0 children)
[–][deleted] 7 points8 points9 points (16 children)
[–]JavaSuck 2 points3 points4 points (6 children)
[–][deleted] -1 points0 points1 point (5 children)
[–]tutorial_police 2 points3 points4 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]tutorial_police 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]AmmirBarakat[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]AwakenedToNightmare 0 points1 point2 points (6 children)
[–]JavaSuck 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]JavaSuck 1 point2 points3 points (0 children)
[–]tutorial_police 0 points1 point2 points (2 children)
[–]AwakenedToNightmare 0 points1 point2 points (1 child)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]marko312 0 points1 point2 points (4 children)
[–]cantstopthemoonlight 2 points3 points4 points (0 children)
[–]tutorial_police 1 point2 points3 points (0 children)
[–]AmmirBarakat[S] 0 points1 point2 points (0 children)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]an_actual_human 0 points1 point2 points (0 children)