About JCreator

Category: Java SE
 
sweegheen
2013-08-20 05:12:05

Sponsored Links
I have just started learning JAVA
using the tools are jdk-6u1-windows-i586-p
and JCreator
not know that I installed the wrong or how
System.out . println (); only party in the Main method was performed
elsewhere, the following error message Error

-------------- ------ Configuration: myproject - JDK version 1.6.0_01 <Default> - <Default> -------------- ------
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ myproject \ Text.java: 3: required <identifier>
System.out.println ("long");
^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ myproject \ Text.java: 3: illegal type start
System.out.println ("long");
^
2 error

ask you seniors
This is how is it?
waiting line `` `` `` `` `

Sponsored Links

beijixingwm
2013-08-20 05:23:09
posted under the source code, or how behold
xiaochen123456789
2013-08-20 05:38:11
System.out.println (); used in the method or constructor
public class Hello {
System.out.println ("lang") ;/ / error
public Hello () {
System.out.println ("lang") ;/ / correct
}
public void sayHello () {
System.out.println ("lang") ;/ / correct
}
public static void main (String [] args) {
System.out.println ("lang") ;/ / correct
}
}
qq48462001
2013-08-20 05:57:47
The above code you have questions, java class file only define properties and methods, Test is a class file, so you
System.out.println ("I broke down!"); statement should on the main () method, or any other method defined inside their
helicopter1985
2013-08-20 06:07:03
public class Test {
System.out.println ("I broke down!") ;/ / This is not acceptable.
public static void main (String [] args) {
Test a = new Test ();
}
}

If you have to write out the method can be
public class Test {
static {
System.out.println (" I broke down! ");
}
public static void main (String [] args) {
Test a = new Test ();
}
}
shyqiuyutian
2013-08-20 06:19:02
Top ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
taapple
2013-08-20 06:37:05
best to code stickers
t9876543
2013-08-20 06:43:44
Oh, not even such a simple test can
code:
public class Test {
System.out.println ("I broke down!");
public static void main (String [] args) {
Test a = new Test ();
}
}
fei3161220
2013-08-20 06:53:26
in the constructor method
nor can
Apart MAIN ()
the other are being given
maoyifan0909
2013-08-20 07:09:37
public class Hello {
System.out.println ("lang") ;/ / error
public Hello ( ) {
System.out.println ("lang") ;/ / correct
}
public void sayHello () {
System.out.println ("lang") ;/ / correct
}
public static void main (String [ ] args) {
System.out.println ("lang") ;/ / correct
}
}

is not correct
error as follows:
-------------------- Configuration: my - JDK version 1.6.0_01 <Default> - <Default> --------------------
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 2: illegal character: \ 65288
System.out.println ("lang") ;/ / error
^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 4: illegal character: \ 65288
System.out.println ("lang") ;/ / correct
^
d : \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 4: not statements
System.out.println ("lang") ;/ / correct
^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 7: illegal character: \ 65288
System.out.println ("lang") ;/ / correct
; ^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 7: not statements
System.out.println ("lang") ;/ / right
^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 10: illegal character: \ 65288
System.out.println ("lang") ;/ / correct
^
d: \ Program Files \ Xinox Software \ JCreatorV4 \ MyProjects \ Hello.java: 10: not a statement
System.out.println ("lang") ;/ / right
^
7 error
wnbsfwnwxs
2013-08-20 07:17:10
shuhang1106
But you see I just made that
not even define the method can
this even
even MAIN ()
have errors in the
xiaoxiaosixu
2013-08-20 07:27:37
I'm sorry, I just made a mistake
a Chinese (
Well now
Oh
Thank you
particular:
shuhang1106
:)
winghehe
2013-08-20 07:31:53
........ faint
jiho1028
2013-08-20 07:38:20
Frankly, we learn together and progress together, software developers need to do more exchanges
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.