So I'm confused what to do then...all I need is to print the unknown type if the users input doesn't match that of the array
Type: Posts; User: Random1
So I'm confused what to do then...all I need is to print the unknown type if the users input doesn't match that of the array
import java.util.Scanner;
class lab5{
public static void main(String[] args){
String[] type = {"byte", "short", "int", "long", "float", "double", "Boolean", "char",...
this is my code and i need to add in
System.out.println("Unknown type: " + result[1]);
when i add it after the first if statement it prints it out 8 times instead of once.
so my question is...