February 2010
1 post
listening to "Close Cover - Wim Mertens" →
relaxáljunk
July 2009
5 posts
hevenu shalom alechem
v
May 2009
3 posts
1 tag
1 tag
Levegőbe bokszol, térden becsúszik: IGEN, MEGVAN a hetvenedik follower, bazmeg!
– azért újpétertől (update: ujpéter) többet vártam ennél. először a twittert fosta tele, aztán felfedezte ezt a tumblarity számot és minden baromságot postolni kezdett. se nem vicces, se nem jó.
2 tags
Eljárás indult hazájában az Eurojust portugál elnöke ellen, mert a gyanú szerint...
– korrupcióval a korrupció ellen..
(index.hu mondja)
March 2009
12 posts
3 tags
josh bloch: automatic resource management →
2 tags
Java: Fail Early, Fail Often →
readable code fail
2 tags
an old java trick →
exception and exception...
What is the result of compiling the code below:
class A{
public void x(){} public void y(){}
} class B extends A{ //1
public void x() throws NullPointerException{} //2 public void y() throws java.io.IOException {} //3
}
The choices:
code compiles without exception
compilation exception at 1
compilation exception at 2
compilation exception at 3
if you’re an experienced java...
2 tags
SCJP mock tests on JavaRanch →
preparing for scjp exam? follow the link and test yourself! hurt of self-esteem is guaranteed.
2 tags
type promotion exception
the following code causes a compilation error.
int i = 120; byte b = i;
how would you change the first line to fix the code (without changing the type of i)?
the problem is (as you probably guessed) that we want assign an int expression to a byte variable. the compiler cannot permit this since the range of int is wider than the range of byte.
if you read the specification carefully...
An XA transaction, in the most general terms, is a “global...
– read on for more interesting details.
3 tags
2 tags
Small Language Changes for JDK7 →
mr. scrappy: what is multyple-exception-handling-catch for? if the code needed for handling two or more exception types is the same it is likely (in my opinion) that the two types have a same parent. why not handle that? or if they don’t share the parent (meaning they are different enough) why should anyone handle them in the same way? why does anyone want to hide the intrinsic differences?
2 tags
generics and instanceof
what do you think the output of the following code is?
List<Integer> list = new ArrayList<Integer>(); System.out.println(list instanceof List<Integer>);
in short: in the above code we declare list with type List<Integer>. in the next ine we try to check whether list is of type List<Integer>. the answer seems to be obvious: the output is true.
actually, the...
introducing untold stories
if you’re a java programmer probably you also have some untold stories. by “untold stories” i mean pitfalls/tricks/tips/overnight-headaches that you’ve experienced but kept in secret - hidden from everyone. when i started my first blog (hungarian) i knew much less java then i previously expected. this revelation led me for reading interesting books such as “Java...