1

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)
1
  • 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

7

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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .