Im making a program and I've to take a user input in character array. But it's giving an error which shows no suggestions available. Please help me out of it. Im posting my class code too.
P.S: Infix Array is a char.
import java.util.*;
import java.util.Scanner;
public class Conversion
{
public static void main(String [] args)
{
stack stk = new stack();
int top = -1; boolean IsOperator;
System.out.print("Enter the infix notation that you want to convert: ");
Scanner scanner = new Scanner(System.in);
//stk.infix.toString();
stk.infix[20] = scanner.next().toCharArray(); //here it is giving the error
int a = 0;
while(a < stk.infix[a])
{
IsOperator = stk.CheckOperator(stk.infix[a]);
}
}
}