Putting in order my two packages and possibly merging them I am making an application which fetches tweets for a specified amount of time, then inserts those tweets in a database and when the user presses another button the top n words and the hashtags will be shown.

This is my Twitter package:

[Package]Twitter
     &gt;[Class]TwitterTools.java


This is my Analyzing package:

[Package]Analyzing
         &gt;[Class]WordCounting.java


This is the TwitterTools class:

public class TwitterTools {

    public static List&lt;Status&gt; search(Query query) {
    }

    public static void filterTweetsBasedOnCity(List&lt;Status&gt; tweets, final String city) {
    }

    public static Query queryMaker(final String keywords, final Date since,
            final Date until, final int count) {
    }
}



search - returns a list of status based on a query
filterTweetsBasedOnCity - deletes status from a list if they were not made in a certain city
queryMaker - makes a query based on the parameters


This is the WordCounting class:

public class WordCounting {

    public static String getHtmlTable(final List&lt;String[]&gt; words, final List&lt;String[]&gt; hashtags) {
    }

    public static Stream&lt;Map.Entry&lt;String, Long&gt;&gt; getTopWords(final int topX, final Stream&lt;String&gt; words) {
    }

    public static String listToHtmlTable(List&lt;Map.Entry&lt;String, Long&gt;&gt; topEntries, final String title) {
    }
}



getHtmlTable - returns the html table of the top X words
getTopWords - returns a stream of the top words
listToHtmlTable - converts a list to an html table


My question is how should I arrange these two packages. Should I merge them since they have only one class each? Should I split them even more by having some of the functions in another class?
The ideal package structure is one which indicates usage. Classes such as these which exclusively contain static methods are definitely utility classes, which I usually put in a util subpackage of your main application.

From what it sounds like, you don't have a main package at the moment which ideally would be your website (in reverse domain order), e.g. com.stackexchange.codereview so that the more specific elements are later, then on top of that you'd have the name of your application which may make it something like com.stackexchange.codereview.tweettrends.

This would be the core of your program, and from here you could then add on your extras.

The Twitter package in particular doesn't sound helpful: your entire program seems to relate to Twitter so it doesn't really convey what that part of the program does. Frankly, I'd just put all those classes under com.stackexchange.codereview.tweettrends.util and add in more sub-packages if you add more classes.

And generally speaking, in Java packages should be exclusively lowercase.