LifeMichael

LifeMichael

Haim Michael Blog

LifeMichael RSS Feed
 
 
 
 

Archive for Java SE

Learning Android Java Applications Development PRO

Using HTML5 and other web technologies when developing an application for the android platform simplifies the development process and helps us cooping with the well known android platform fragmentation problem. I chose to write this post in order to point at those cases in which we cannot avoid using Java in our application development for [...]

Android 4.1 Professional HIT November 2012 INFO

On November 15th I start delivering a professional course for learning how to develop applications in Java for the android platform. The course includes 180 academic hours, it takes place in HIT and it splits into three parts. The first part covers the topics in Java required for learning android development and it includes extensive [...]

Scala Programming HIT October 2012 INFO

During the first semester of the 2012-2013 academic year that takes place in HIT, I deliver an academic advance course for learning Java and Scala. This course is delivered as part of the academic program for BSc in computer science. You can find the google group of this course at https://groups.google.com/forum/#!forum/hit-scala-october-2012. You can find the [...]

Generics Implementation in Java PRO

The generic class has the same behavior for all of its possible parametric types. The same generic class can be viewed each time as if it has a different parametric type. For the JVM it doesn’t matter which parametric type we chose to instantiate a generic class with. In all cases, for the JVM it [...]

Generics’ Bounded Wild Cards in Java PRO

When using a bounded wild card we can limit the parametric type as if we were saying that it can be any type as long as it extends or implements a specific type we specify. package il.ac.hit.samples; import java.util.Iterator; import java.util.Vector; public class BoundedWildCardSample { public static double calculateTotal(Vector<? extends Shape> vicy) { double sum [...]

Generic Type Arrays in Java Limit PRO

When using an array of generic type objects in Java we cannot specify the exact parametric type. This limit exists due to the way generics is implemented in Java (in the compiler level). package il.ac.hit.samples; public class ArraysGenericsLimit { public static void main(String[] args) { MyStack<?> []vec = new MyStack<?>[10]; vec[0] = new MyStack<Rectangle>(); vec[1] [...]

Java 7 Type Inference for Generic Instance Creation PRO

As of Java 7 we can take out the type arguments required to instantiate a generic class as long as the compiler can infer the type arguments from the context. Many developers name the remaining pair of angle brackets as ‘diamond’. package com.abelski.samples; import java.util.LinkedList; import java.util.List; public class GenericsTypeInference { public static void main(String[] [...]

Java 7 Multiple Exception Types Catch PRO

As with Java 7 we can handle more than one type of exception using a single catch block. We should use the ‘|’ operator for putting them together in the same catch statement. When catch handles more than one type of exception the catch parameter is implicitly final. We won’t be able to assign it with [...]

The Java 7 try-with-resources Statement PRO

As of Java 7 we can code a try statement that declares one or more resources. Each resource is an object that must be closed after the program is finished. The try-with-resources statement ensures that each resource is closed at the end of the statement. Each object considered as a resource must be instantiated from a class [...]

Java 7 Switch Case PRO

As of Java 7 we can write a switch case statement that works on strings. This new capability might assist us with writing a shorter code. package com.abelski.samples; public class Demo { public static void main(String[] args) { String operator = args[1]; double numA = Double.parseDouble(args[0]); double numB = Double.parseDouble(args[2]); String result; switch(operator) { case [...]

Facebook Page

Life Youtube

Categories

Communities


Certifications




Tags

Speaker Wiki

My Facebook

Technorati

Add to Technorati Favorites

Recommend

Archives

Countries I Visited


visited 17 states (7.55%)
Create Your Own Map!

ClustrMaps

Recent Searches

FeedJIT

Google Page Rank

Alexa Stats

Courses I Teach


 

My Free Lectures


 

 

 

My Free eBooks


 

 

 

 

 

 

 

 

 

 

 

 

 

 

Courses 1996

Courses 1997

Courses 1998

Courses 1999

Courses 2000

Courses 2001

Courses 2002

Courses 2003

Courses 2004

Courses 2005

Courses 2006

Courses 2007

Courses 2008

Courses 2009

Courses 2010

Courses 2011

Courses 2012

Courses 2013