KakimotOnline

February 28, 2008

Looking for a job?

Filed under: news — nandokakimoto @ 3:45 am

1203951244547_582.jpg1203951244547_581.jpg1203951244547_581.jpg

For you who are looking for opportunities to work with IT take a look on the RentACoder site.

The site is like a big sale of programmers, where programmers may register and compete to jobs in your specific area. Companies offer jobs and suggest the price they are able to pay. So, who makes the better price, takes the service.

Each offer comes with a detail description about it and its deadline. A nice feature is that after the work’s conclusion, the programmer may be evaluated by the quality of service and by the respect of the specified deadline.

If you have a free time, it’s worth to take a look!! More informarion, click here.


Fernando

February 27, 2008

Java Challeng (2) Answer

Filed under: java, news — nandokakimoto @ 12:45 am

Well, the comments are right.

public class Test {
          public static void main(String[] args) {
                         String s1 = new String(”Test 2″);
                         String s2 = s1;
                         System.out.println(”s2 = ” + s2);
                         s1 = s1 + ” modified”;
                         System.out.println(”s2 = ” + s2);
          }
}

The code above will print:

Test 2
Test 2

However, the real reason of that is a particularity of the String class. For any other object type, where two references refer to the same object, if either reference modify the object, both references will see the change because there is still only a single object. But any time we make any changes to a String, the Virtual Machine will update the reference variable to refer to a different object.

After the assignment,  s1 and s2 variables refer to diferrent String objects, so the reference used to modify the String refer to the new object, which not modify the older one.


Fernando

February 24, 2008

Java Challenge (2)

Filed under: java — nandokakimoto @ 6:10 pm

Here I am again!!

The most of java programmers have in mind the knowledge about reference variables, so it’s easy for them to tell the console output of the code below:

import java.awt.Dimension;
public class Test {
              public static void main(String[] args) {
                          Dimension d1 = new Dimension(100, 50);
                          Dimension d2 = d1;
                          System.out.println(“d2 width = ” + d2.width);
                          d1.width = 50;
                          System.out.println(“d2 width = ” + d2.width);
              }
}

The variables d1 and d2 make reference to the same, and the only one existing, Object. So, changes made by d1 will affect the Object’s content, wich is referenced by d2 too. So the console output is:

d2 width = 100
d2 width = 50

After that explanation, what is the console output of this similar code?

public class Test {
          public static void main(String[] args) {
                         String s1 = new String(“Teste 2″);
                         String s2 = s1;
                         System.out.println(“s2 = ” + s2);
                         s1 = s1 + ” modified”;
                         System.out.println(“s2 = ” + s2);
          }
}

Try to answer it without implementing any code, all right? :-)
Next post, I’ll show the answer.


Fernando

Gmail By Human Beings

Filed under: google — nandokakimoto @ 12:50 am

The video below shows how to present Gmail’s functionalities without having to programming them.

It would be a kind of prototyping mechanism?? Watch it and answer by yourself.

At really, this is just a Gmail commercial in Russia. Fantastic, isn’t it?


Fernando

February 22, 2008

While Microsoft attempts buying the Yahoo!, Google maybe buy…

Filed under: google, mobile, news — nandokakimoto @ 1:15 am

While the whole world look at the Microsoft’s attempts to buying Yahoo!, the Google, investing in wireless devices, maybe will buy a balloon company.

Yeah, you didn’t read wrong and I will repeat: Google may buy a Balloon Company.

According to the Wall Street Journal, the idea of use balloons to provide wireless service to millions of rural Americans has caught the eye of Google Inc.

More information on http://online.wsj.com/public/article/SB120347353988378955.html?mod=blog

There is also a nice video demostrating this experience.


Fernando

February 21, 2008

Java Challenge Answer

Filed under: java — nandokakimoto @ 11:58 pm

Yes Ademir, you’re completly right.

In Java, all classes extends Object, and every class, before execute its constructor’s code, makes a call to its superclass through the ’super()’ assignment. So, if you don’t call ’super()’ inside the subclass’s constructor, the compiler will do it for you implicitly, but it will always decide by using the ’super()’ with no-args.

In the last post, TShirt class doesn’t declare any constructor, so the compiler defines a default constructor with default ’super()’ with no-args. However, its superclass (Clothes) doesn’t have a default constructor. So we must declare ’super(“string goes here”)’ in TShirt’s constructor explicitly or we will get a compiler error.

The right code would be:


class Clothes {
Clothes (String s) { }

}

class TShirt extends Clothes {
TShirt() {
super(“explicitly call to superclass”);
}

}

Later, I’ll post others Java Challenge.
Keep tuned.


Fernando

Older Posts »

Blog at WordPress.com.