User input into array.
E.g.
private void addVideo()
{
Scanner in = new Scanner( System.in );
String message = "Video";
System.out.print("Enter Video Name: ");
return in.nextLine();
}
In in class:
public static String nextLine()
{
return in.nextLine();
}
I have compile error 'incompatible types: unexpected return value.' What is the problem? explanation will be appreciated.
Thanks!
How do I assign the entered video name into an array? e.g. first video name into id array(id=1) second is id = 2 and so on?
addVideo()is void when its returning stringvoidbut returningString