Check If Date Is Valid Using Java

Here is a simple method to check if a Date is valid or not. It requires the month, day and year as int parameters and the method uses a Calendar object to determine it. Remember that months in the Calendar class start with 0 (January) and so on.

public static boolean isDate(int m, int d, int y) {
  m -= 1;
  Calendar c = Calendar.getInstance();
  c.setLenient(false);
  try {
    c.set(y, m, d);
    Date dt = c.getTime();
  } catch(IllegalArgumentException e) {
    return false;
  }
  return true;
}

Like what you see? Buy me a cup of coffee. Or subscribe to my feeds.


(4 votes, average: 5.00 out of 5)
 Loading ...

ChocChocPop For iTouch

A Bejeweled clone game from EpicForce that features mouth watering chocolate images. The game play is the same for the classic and arcade mode. Move items horizontally and vertically to match 3 or more chocolates. Once you make a set of matches, the heart symbol fills up with chocolate syrup. Once the heart gets full, you move on to the next level. As you move on to more levels, the variety of chocolates increases. The only difference between the classic and arcade mode is that there is a timer involved in the arcade mode. If you do not make a match during a set interval, your heart filling lessens. When it gets empty, the game ends.

The game also features a puzzle mode wherein you are given a few number of chocolates and a limited number of available moves. The goal of this mode is to clear out and match all chocolate items with the given number of moves allowed. The first few levels is easy and later on may be a bit hard as you move on the next levels. Luckily, you will not start from the beginning if you do not manage to solve a level. At least it will restart the same level for you to try again. The graphics is awesome and the sound is pretty amazing. This game is as enjoyable as it is addicting. You will not be sorry!

Like what you see? Buy me a cup of coffee. Or subscribe to my feeds.


(4 votes, average: 5.00 out of 5)
 Loading ...

Diamond Islands For iTouch

Discover Diamond Islands, Digital Chocolate’s iTouch game that provides an incredibly fun and exciting puzzle game that will get you hooked up for hours and hours. Packed with 100 islands of puzzle fun, strategy and obstacles, the game play is pretty simple. Explore the archipelagos hidden treasures including, a tropical paradise, volcano and ancient ruins, uncovering the secrets of the spells gallery as you go. Gather diamonds while you move your totem around and once you gather them all, placing your totem on the end point to move on to the next island. Sounds simple right?

Well yes. When you start off, puzzles are simple. But as you move on to the next island, you will find out that the puzzles get more challenging like finishing the puzzle within a limited number of moves. The graphics are good as is the tribal like music. Moving your totem around is easy. Either tilt or shove the totem around the island to solve puzzles and collect the diamonds. You can also unlock special spells in the process (though I do not know if the spells have any significant use, I do not see any way of accessing them or something). Still, this game is a good one to add to your iTouch collection. Kudos to Digital Chocolate for creating another fun iTouch game.

Like what you see? Buy me a cup of coffee. Or subscribe to my feeds.


(3 votes, average: 5.00 out of 5)
 Loading ...

Karisma Hotels

Karisma Hotels is a group of secluded white sand beaches on the Mexican River Maya. Resorts and beaches include family oriented and adults only. All amenities you are looking for are here, and more. State of the art technology and the best service giving you an unforgettable experience making you wanting to come back again and again. One important aspect for a good resort is its food. They strive to be unique. They create their own pasta and sauces, bake their own bread and use fresh from the market ingredients to make sure that what gets served to you is fresh and new. If you are on some kind of diet, they even have special menus for you to choose from. The awesome view of the horizon and landscape abound in all their beaches and resorts. Whether you are in for a family oriented theme like Azul Beach or favor an adult only themed resort like Cancun All Inclusive Adults Only, these are just a few of the resorts and hotels that Karisma Hotels offers to tourists and travelers.

Like what you see? Buy me a cup of coffee. Or subscribe to my feeds.


(No Ratings Yet)
 Loading ...