+ 1

i used scanner. but output didn't come. (code is below)

import java.util.Scanner; public class SASIM{ public static void main(){ Scanner name = new Scanner(System.in); System.out.println(" Enter the message you want to print "); String wd = name.nextLine(); System.out.println(wd); } }

15th Apr 2020, 4:28 AM
SASIM WD
SASIM WD - avatar
1 Answer
+ 2
Where is String[] args in main() It should be like this.. public static void main (String[] args) Then you'll get the output... 👍
15th Apr 2020, 4:42 AM
sarada lakshmi
sarada lakshmi - avatar