£
£ukasz Krawczyk
Make a new Java project in IntelliJ Idea and add the following files. Try to
compile them.
1.
public class Test {
// Variable name is the same as Class name!!!
static String String;
public static void main(String[] args) {
System.out.println(String.valueOf('c'));
}
}
2.
import java.util.ArrayList;
public class Test2 {
ArrayList list = new <String>ArrayList<String>();
}
In the first example IntelliJ gives a warning: "Static member ... accessed
via instance reference", however Sun compiler doesn`t show anything.
In the second example Intellij doesn`t show anything, hovewer Sun`s compiler
points out a BUG.
I work on IntelliJ 5.1.2. Are these problems present in another IDE-s?
Are these true BUGS or is there something with my brain
Jujo
compile them.
1.
public class Test {
// Variable name is the same as Class name!!!
static String String;
public static void main(String[] args) {
System.out.println(String.valueOf('c'));
}
}
2.
import java.util.ArrayList;
public class Test2 {
ArrayList list = new <String>ArrayList<String>();
}
In the first example IntelliJ gives a warning: "Static member ... accessed
via instance reference", however Sun compiler doesn`t show anything.
In the second example Intellij doesn`t show anything, hovewer Sun`s compiler
points out a BUG.
I work on IntelliJ 5.1.2. Are these problems present in another IDE-s?
Are these true BUGS or is there something with my brain
Jujo