标题:[求助]Jcreator编写程序
只看楼主
闲人勿进
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-1-13
 问题点数:0 回复次数:7 
[求助]Jcreator编写程序

用Jcreator 4.0版本编写如下程序,但出现了问题。
public class Escape Sequences
{
public static void main(String args[])
{
System.out.println("Displaying single quotes:"+"\'A\'");
System.out.println("Displaying double quotes:"+"\"string\"");
System.out.println("Displaying a backslash:\\");
System.out.println("Text separate\t\tby two tabs");
System.out.println("Here is double\n\nspaced text");
System.out.println("**********\r#####");
}
}

问题如下:
C:\java exercise\Escape Sequences.java:1: 需要 '{'
public class Escape Sequences
^
1 错误

处理已完成。


--------------------配置: <--------------------
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image

处理已完成。

搜索更多相关主题的帖子: Jcreator println System 
2007-10-19 18:34
little_stone
Rank: 1
等 级:新手上路
威 望:1
帖 子:163
专家分:0
注 册:2007-5-29
得分:0 
类名中间不能有空格

2007-10-19 19:15
闲人勿进
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-1-13
得分:0 
试过了,还是不行。
2007-10-19 19:24
soita
Rank: 1
等 级:新手上路
帖 子:60
专家分:0
注 册:2007-10-9
得分:0 

把空格去掉就OK了


┈1切┅o. §尽在+.┐`!不言中﹌ОooО°
2007-10-19 21:18
晨风lxj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2007-9-13
得分:0 

把空格去掉,注意末尾还有个空格!

2007-10-19 22:11
bsjsjwt
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-1-10
得分:0 
--------------------Configuration: <Default>--------------------
Displaying single quotes:'A'
Displaying double quotes:"string"
Displaying a backslash:\
Text separate       by two tabs
Here is double

spaced text
**********
#####

Process completed.

文件名和你的类名一致   

import *;
public class Escape Sequences
{
public static void main(String args[])
{
System.out.println("Displaying single quotes:"+"\'A\'");
System.out.println("Displaying double quotes:"+"\"string\"");
System.out.println("Displaying a backslash:\\");
System.out.println("Text separate\t\tby two tabs");
System.out.println("Here is double\n\nspaced text");
System.out.println("**********\r#####");
}
}
2010-01-10 09:11
圣斗士
Rank: 1
等 级:新手上路
帖 子:4
专家分:3
注 册:2010-3-22
得分:0 
Error : Invalid path, C:\j2sdk1.4.2_16\bin\jdb.exe -classpath "E:\JCreator Pro\MyProjects\lbk\classes" hello"
这是怎么了
2010-03-22 21:48
lizhigushuan
Rank: 1
等 级:新手上路
帖 子:22
专家分:5
注 册:2013-1-14
得分:0 
回复 7楼 圣斗士
变量没设置好!!自己去网上找怎么设置变量!
2013-02-08 20:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-179125-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.126676 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved