Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 2550

Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.

7 votes

Testing for object equality by comparing the toString() representations of objects

It's just crazy, because it can go wrong, because string representations are not canonical: Double zeroDouble = new Double(0); Integer zeroInteger = new Integer(0); zeroDouble.doubleValue() == zeroIn …
Joonas Pulakka's user avatar
10 votes
Accepted

What do I need for Java Socket programming?

You don't need to install anything special. Socket has been in the standard JDK since version 1.0. See socket tutorial to get started. If you want to test how the communication works between process …
Joonas Pulakka's user avatar
28 votes

How to deal with checked exceptions that cannot ever be thrown

always done it like this: try { foobar = new InputStreamReader(p.getInputStream(), "ISO-8859-1"); } catch(UnsupportedEncodingException e) { throw new AssertionError(e); } May be a bit verbose (Java … If the Java implementation is broken, you'll want to get as good error message as possible, as quickly as possible, instead of just ignoring the impossible. …
Joonas Pulakka's user avatar
7 votes
Accepted

Is Python's C interface faster than JNI?

Regardless, Java is usually considered to be way faster than CPython. …
Joonas Pulakka's user avatar
0 votes

Java Communcation API not available for Windows

There are several libraries written for this, just google for rxtx + java. One of the alive ones seems to be http://code.google.com/p/java-simple-serial-connector/ . …
Joonas Pulakka's user avatar
20 votes
Accepted

Is it not a good practice to handle runtime exceptions in the code?

It depends. For example, Integer#parseInt throws NumberFormatException (which is a RTE) if the provided string can't be parsed. But surely you don't want your app to crash just because the user wrote …
Joonas Pulakka's user avatar
4 votes

Will Java still be relevant in 5 years?

Java the language may be in slow decline, but Java the platform (JVM + JDK) has definitely been booming during the last couple of years (Scala, Clojure and many other languages; Android framework). … So I would expect Java the platform to be relevant in 5 years, and even in 15 years. That also makes Java the language relevant in the long term, even if its popularity may be past the peak. …
6 votes

Help me catch up on what I've missed since Java 1.4.2

The best resource for learning it is (probably) the Java Concurrency in Practice book. …
Joonas Pulakka's user avatar
6 votes

Using HashTable without overriding hashcode()

What's gonna happen if we do not override hashcode method for our class, then add it to HashTable and then try to get objects? It depends on what "adding to HashTable" means. Java's Hashtable doe …
Joonas Pulakka's user avatar
4 votes

Do you start migrating your Swing project to JavaFX

Swing is becoming a legacy technology, or is already. However, it's quite good in what it does and isn't going away in any foreseeable future, so I see no reason to move away from it, particularly if …
Joonas Pulakka's user avatar
1 vote

Forward and backward fourier transform image in java

JTransforms is probably the fastest Java FFT library around. …
Joonas Pulakka's user avatar
7 votes
Accepted

What factors to consider when choosing runtime/language for Windows desktop applications?

We went for Java (Swing) plus some native parts via JNI. … But as a long term investment I trust Java more. …
Joonas Pulakka's user avatar
11 votes

Why should I declare a class as an abstract class?

How it is different from an Interface? In an abstract class, you can implement some methods, and leave (force) the rest to be implemented by the extending class. You can't implement methods in a …
Joonas Pulakka's user avatar
197 votes

My Dad is impatient with the pace of my learning to program. What do I do?

I showed him a C++ program I made that takes what you type in, then assigns values to each letter (A is the first letter in the alphabet so it gets the value of 1).. and so on. It then adds up all …
18 votes

Is Java (still) the cross platform language of choice?

While Java may not be the or the only viable cross-platform tool, it has some strengths: It's extremely fast. It's extremely robust. … When talking specifically about Java the platform, there's one point more: There are quite a few languages that run on the JVM and interoperate with Java. …
Joonas Pulakka's user avatar

15 30 50 per page