• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Java exercises to do

 
Sam Lanza
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody know where I can get a whole lot of Java exercises? I feel that's the biggest part missing from my studying: The hands-on experience. There's a lot of books out there, but there's not enough hands-on exercises... the books tend to scrimp. I'd like to hit the following areas heavily with exercises:

GENERICS: passing methods with/without Generics.. Creating custom Generics

REGEX: searching with Pattern/Matcher, Searching with Scanner, Using Scanner for tokenizing, Using String.split() for tokenizing

THREADS: use with synchronization, use with wait/notify/notifyALL

CALENDAR EXERCISES: Use of Calendar, Date, DateFormat, and Locales in useful situations.

INNER CLASSES: Just general exercise practice with static nested classes and inner classes.

OBJECT ORIENTED: General OO type exercises putting inheritance to work along with how static methods play its part here.

JAVA/JAVAC: Exercises in compiling and running classes from various different directories with different packages, etc.

COLLECTIONS: Exercises in the usage of various types of collections and arrays and which would be most useful for what.

ARRAY and COLLECTIONS SORT/SEARCH: This is a major weak area of mine. I'd like to tackle exercises in how to use binarySearch, Comparable, Comparators for both Array and Collection.

MAPS: Also, a very weak area of mine. Need practice using maps with key/value pairings. Also, I need practice with overriding equals and hashcode.

There's probably more that will come to me, but these are off the top of my head. I've been having a hard time finding a book or website with nothing but exercises with clues/answers. Help would be appreciated!
 
Sam Lanza
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody know of a Java workbook out there with just exercises? I'm actually preparing for the Java Programmer certification and I learn best by DOING. I've got theory coming out the ears and I need to learn in a practical way. Would appreciate any kind of recommendation.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12144
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked out the JavaRanch Cattle Drive?
 
Brandt Charles
Ranch Hand
Posts: 57
Chrome IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know of any workbooks, but each chapter of Deitel & Deitel's Java: How to Program has a load of questions after each chapter that will cover all these topics. The book is great, but comes with a hefty pricetag up to $100 US. The Java tutorials at Sun usually have questions at the end of each section too IIRC.

You could also peruse the Programming Puzzles forum on this very site.
 
John Abong
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch Cattle Drive!
 
Sam Lanza
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the advice! I'll try this cattledrive. It looks like there's not many exercies in there, but I'll give it a shot before clunking down $100 for deital & deital.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49382
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with Brandt Charles. There are second-hand copies of Deitel and Deitel on Amazon.com from $39.99 + $3.99 postage. That is the 6th edition, and there is now a 7th edition, but I don't think a beginner will notice the difference between the two editions.

There are copies of the 5th edition for a lot less, but I think that is now best regarded as out of date.
 
Sam Lanza
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Campbell, thanks for that bit of advice! $100 is just way too much. But $40 is much more reasonable. I just bought one of those from Amazon. It's used, but it's like new with the cd still sealed and everything. I'm heard some good things about this book and I'm hoping it has a lot of good exercises to do. Anyway, thanks again!
 
siddu dyade
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam

Hope You are Doing Good

[ UD: Removed description of illegal activities. Here at JavaRanch we take a stern line again this kind of behavior. Don't do it again. ]

Regards
Shivakumar
[ November 28, 2007: Message edited by: Ulf Dittmer ]
 
Chetan Graham
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.greenteapress.com/thinkapjava/thinkapjava.pdf

This free, excellent book on learning Java from the ground up is well worth your time.
The author writes,"The fourth edition is tailored to help students prepare for the Computer Science AP Exam,"
Book Title "Think Like A Computer Scientist in Java"
By Allen B. Downey

Why spend money when there is an overwhelming resource of free University and Professional level books out there not to mention the Sun site as well.
Check it out. I've got more Java books for free than I need right now on the computer.

Hope this helps
Blessings,Chetan
 
sovan dara
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will find a lot of Java exercises with solutions and tips here: http://www.worldbestlearningcenter.com.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49382
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I am afraid I do not think the few exercises I read are good, nor the few questions I read.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic