The fact that you're a beginner says that you should be reading a good book on Java, not signing up to this forum. You're nowhere near ready to be asking questions, first you need to invest a great deal of time to learn and understand this stuff.
Head First Java 2nd edition is a good book if you like to learn through puzzles and games.
I take it you have this need in a programming class... drop the class, take it again next quarter, and read the book and pay attention in class. If you have done these things, then I seriously advise you to consider another line of study.