+ 2
This doesn't work but is it possible without having to write string 3 times for x,y,z?
String x; y; z; x = "good job"; y= "somone knows"; z = "what there doing!"; System.out.println(x + y + z );
4 odpowiedzi
+ 5
Try this way
public class Program
{
public static void main(String[] args) {
//String x; y; z;
String x, y, z;
x = "good job ";
y= "somone knows ";
z = "what there doing!";
System.out.println(x + y + z );
}
}
+ 7
Try this way
System.out.println("good job"+"someone knows"+"what there doing!");
+ 2
Uhm can you maybe tag your attempt to program it?
Like this:
https://code.sololearn.com/cC58qcBHCuRO/?ref=app
+ 1
@ ekansh i wanted to use a string without having to write string 3x.
Otherwise i would of just done
System.out.println("good job someone knows what there doing");
but thats not what i wanted.
@devender spot on mate 👍👍