Jo Jake wrote:I was very new to Java, then in few weeks time I have just finished now learning core java using HeadFirst Java book. But I didn't covered the topics on GUI - (swing,awt) . Now, I would like to know your suggestions regarding which is the easiest part to learn next in Java - Is that GUI topics like swing, awt so that I would be directing towards Desktop applications (right ?). Or is it easier to learn j2EE (jsp, servlets, ejb, jsf, frameworks like spring etc). I don't know anything other than core java topics I just learned. Though I had more than 3 years of PHP based web development, I thought to shift into Java due to some reasons! But I would like to know which part of Java is easier to start learning - Desktop app or web app ? As far as I come to know, it seems a lot of time and involvement is required to work on web side as I hear a lot of complexities in here such as EJB, JSF, frameworks, etc.
Also, please let me know what all do we have in Java to deal with database Or what we should learn to wire java app with database. Is that same for web development as well as desktop app ?
Thanks so much in advance to any and all advices I get from this forum.
Martin Vajsar wrote:
You will certainly not be able to make this using a single list and binary search. The binary search needs the items to be sorted by the criteria you use to perform the search, and with different comparators, these orders would be different.
public class MovieInfoManipulator {
ArrayList<Movie> moviesList;
public int searchByMovieName(ArrayList<Movie> moviesList,
String searchKeyword) {
// sorting before searching
Collections.sort(moviesList);
// binary search
return Collections.binarySearch(moviesList, searchKeyword);
}
public int searchByMovieName(ArrayList<Movie> moviesList,
String searchKeyword) {
// sorting before searching
Collections.sort(moviesList);
// binary search
return Collections.binarySearch(moviesList, searchKeyword);
}
chris webster wrote: ..or find a new job that might expose you to Java while you are learning?