Skip to main content

Java problem on methods and classes

No replies
picasso88
Offline
Joined: 2012-01-29
Points: 0

hi guys, i'm new to the java language, so I met some difficulties undestanding a code line:

List<Diary> list = query<Diary>(diaries).execute();

I need to generate classes and methods that allow to use that line of code. So i've 2 questions:

1. There's a way to use query<Diary>(diaries) as a method that returns an object (istance of a class with the method execute)?

Moreover, even if i could define this method within a class where I've to use that line of code, i would use that line of code also in other classes.

2. It's correct the way to use that method? query<Diary>(diaries) I mean, what that parameters (<Diary> and (diaries) stand for?

Thanks a lot in advance.