There is no difference at all in memory allocation or performance for your application; import statements do not have any impact at runtime on your program at all. They are just directives to tell the compiler where (in which packages) to find classes.
However, it is best to avoid the wildcard syntax and always use specific imports. Doing this will avoid a problem with regard to compatibility with future versions of libraries with your program.
Suppose you are using version 1.0 of some library in your program, and you do import somelibrary.*;. Suppose your program has a class named X. Now, version 1.1 of the library comes out and you want to use it. Suppose that by chance there is a new class named X in version 1.1 of the library.
If you used the wildcard syntax, you are suddenly also importing X from the library. The compiler will then give you an error, because there's already a class X in your program, and the compiler can't distinguish between your X and X from the library.
If you only import the classes that you actually need from the library, then you don't get this problem, because you won't automatically import X from version 1.1 of the library.