So I am just testing stuff out, and lets say I want to set a string to something, for example:
java Code:
public class Party
{ String Name; String Event; public void DisplayInfo
( ) { System.
out.
println("Happy" + Event + Name + "!"); } public void setInfo
(String PName,
String vent
) { PName
= Name; vent
= Event; } public static void main
(String[] args
) { Party celebrate
= new Party
(); celebrate.
setInfo("Officer Barbrady",
"Birthday"); celebrate.
DisplayInfo( ); }}
Lets make it display Happy Birthday Officer Barbrady!
But that won't work the output is: Happynullnull!
What am I doing wrong?