I have a piece of code as following:

List<name.test> nameList

In List is name a class or object. Why would we use such an annotation?

Or for example:

method(name.test variable)
  • Using upper case first letters on class names and lower case first letters on variable names (or vice versa) can help a bit List<Name.Test> nameList. So can better class names.
    – Keith C
    Jan 15, 2020 at 11:18

1 Answer 1


This is probably because the clas Name contains the definition of another inner class like this:

public class name{
   public class test{

If so, you have to specify the parent class name before referencing the test inner class.

So if you want to make a list of records of type name.test, you have to use: List<name.test>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.