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
***UPDATE***
Figured it out. Window-> Preferences-> General-> Editors-> Keys-> Edit-> Word Completion-> Add "Tab"
- Here is my first bit of code from scratch:
* 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;
* }
*
* StorageTest.java by Abmoraz
*/class StorageSize {
* StorageSize.storage() 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.print(S.storage(str));
System.out.println(" bytes of storage.");
return;
}
}
-Ab
Netbeans (Score:2)