Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
User Journal

Journal Abm0raz's Journal: Java update 1

Ok, thanks to those that responded. I'm using Eclipse right now and following the "Thinking In Java" book (just finished chapter 2.

Some observations so far:

  • Is there any difference in Syntax from C++? I mean besides the obvious as Java lacks pointer notation (so no *p references), but from what I've seen so far, the syntax is exactly the same as C++, except that it's case sensative.
  • One thing frustrates me to no end in Eclipse: Whenever I type out an object, class, or method and get to the "." to call something else inside it, it pops up all possible matches. This I like, but is it possible to change it so that when the match I want is the first in the list that I can hit "tab" instead of "enter" to select it. Just a pet peeve as all of the IDEs I used for my other languages used the tab button and it's getting a bit frustrating :)

    Figured it out. Window-> Preferences-> General-> Editors-> Keys-> Edit-> Word Completion-> Add "Tab"

  • Here is my first bit of code from scratch:

    /* Thinking in Java 3rd ed. r4.0
    * Chapter 2 Exercise 5
    * Write a program that includes and calls the storage( )
    * method defined as a code fragment in this chapter.
    * Fragment:
    * 1. int storage(String s) {
    * return s.length() * 2;
    * }
    * by Abmoraz

    class StorageSize {
    /* A string requires 2 bytes for every character.
    * returns this value.
        int storage (String s) {
                return s.length() * 2;

    public class StorageTest {
        public static void main(String[] args) {
            StorageSize S = new StorageSize();
            String str = new String("ThinkingInJava");
            System.out.println("The string: ");
            System.out.println(" " + str);
            System.out.print("requires ");
            System.out.println(" bytes of storage.");


This discussion has been archived. No new comments can be posted.

Java update

Comments Filter:
  • I missed your first entry about java. If you find yourself not liking eclipse I much prefer netbeans. Eclipse really seems meant for groups who want to do projects using the eclipse platform, where netbeans is just a good old IDE.

Polymer physicists are into chains.