package com.codegym.task.task03.task0302;
/*
Display right away
*/
public class Solution {
// write your code here
public static void main(String[] args) {
printString("Hello, Amigo!");
}
public static void printString(String s);{
System.out.println("s");
}
}
Could you help me find my mistake here in the below code for the task.
Under discussion
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
William Leininger
16 January 2019, 14:49
You don't need to use "s" which would be to specify text that isn't assigned to a string variable.
s is being passed into the method as a declared initialized string variable called s so all you need to do is reference the name of the variable s without the ""
0
fareed
7 January 2019, 11:31
you just need to write the name of passed string in the printString method ;
no need to use "s";
0
Guadalupe Gagnon
6 January 2019, 16:54
0
Monica Nicoleta
6 January 2019, 16:03
In the printString method, the display command should only contain the name of the string, it's value being described in the main method. So no need for punctuation in the display command.
0
Syed Tayyab ul Mazhar
6 January 2019, 10:00
printString method should print the value of the string passed to it.
0