I am learning java. I wrote the following code but I am getting this error \"cant make a static reference to a non static input field\" in Arrayfunction(), when I try to take in
The reason for this error is: As you have not created the object the non-static variable input does not exist, so you can not use it.
To fix it you can make input as static