|
This course
- C# and Java Keyword Comparison last updated: 08/07/2006 |
There are ~76 reserved keywords in C# 2.0, and ~55 in Java 1.5.
|
C# |
Java |
C# |
Java |
C# |
Java |
C# |
Java |
|
abstract |
--- |
--- |
this |
this |
|||
| --- | assert |
native |
--- |
throw |
throw |
||
|
--- |
false | false |
--- |
--- |
throws | ||
|
super |
finally |
finally |
--- |
--- |
transient | ||
|
boolean |
fixed |
--- |
--- |
true |
true | ||
|
break |
float |
float |
private |
private |
try |
try | |
|
byte |
byte |
for |
for |
protected |
protected |
--- | |
|
case |
case |
--- |
public |
public |
uint |
--- | |
|
catch |
catch |
--- |
--- |
ulong |
--- | ||
|
char |
char |
goto |
goto1 |
--- |
--- | ||
|
--- |
if |
if |
return |
return |
--- | ||
|
class |
class |
--- |
sbyte |
byte |
ushort |
--- | |
|
const |
const1 |
--- |
final |
import | |||
|
continue |
continue |
int |
int |
--- |
--- | ||
|
decimal |
--- |
interface |
interface |
short |
short |
void | |
|
default |
default |
internal |
protected |
--- |
volatile | ||
|
--- |
is |
instanceof |
--- |
while | |||
|
do |
do |
lock |
synchronized |
static |
: |
extends | |
|
double |
double |
long |
long |
--- |
strictfp |
: |
implements |
|
else |
else |
namespace |
package |
string |
--- |
||
|
enum |
enum |
new |
new |
struct |
--- |
||
|
--- |
null |
null |
switch |
switch |
1 Although goto and const are Java language keywords, they are unused in the Java language.
2 Although get and set are not actually reserved keywords--they are accessors. typeof is not actually a keyword--it is an operator.
3 The using keyword in C# has two completely different uses, as a directive (like Java's import) and as a statement (which defines a temporary scope).
Visitors: