hi, everyone
I am a
java newbie and I basically have a very simple class like:
public class RequestClass {
private
String username;
private String pass;
}
I have compiled it and I want to import it in another class called LoginController. The class RequestClass is basically in the same folder and right next to LoginController (so the same package, so it shouldn't need to be imported). But if I try not to import it in the LoginController class, then it simply doesn't find the RequestClass and when compiling the LoginController says error: cannot find symbol.
This is the LoginController class:
The purpose of this whole class as written here is for
testing only! I am basically passing a username and password with javascript using the JSON.stringify method. I am deserializing the object using the com.google.gson library.I am then converting the object right away to a json object to be sent back again to the front-end. I know, I know this is probably not the best way to test things but everything should be working because I followed the official documentation for using the com.google.gson library and a bunch of tutorials. I am getting the ridiculous and very newbie error: '.' expected import RequestClass;
I am also guessing that this error is so ridiculous that a lot of you haven't even seen it before. So obviously the RequestClass isn't imported correctly and I just don't know how to import it in this case. I have programmed in many other languages but not that much in Java.
I know I am missing some very basic concepts here. Please, help me!