-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
22
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
When compiling a Java file containing multiple classes, including `Sample` and `sample`, only one of the compiled files is generated (e.g., `Sample.class`). The expected behavior is that both `Sample.class` and `sample.class` should be generated, as Java is case-sensitive.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Java file with the following content:
```java
class Sample {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
class sample {
public static void main(String[] args) {
System.out.println("Hello World");
}
}```
2. Compile the file using javac Filename.java.
3. Check the generated .class files
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Files with name Sample.class and sample.class should be present.
ACTUAL -
only one file is present.
FREQUENCY : always
When compiling a Java file containing multiple classes, including `Sample` and `sample`, only one of the compiled files is generated (e.g., `Sample.class`). The expected behavior is that both `Sample.class` and `sample.class` should be generated, as Java is case-sensitive.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Java file with the following content:
```java
class Sample {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
class sample {
public static void main(String[] args) {
System.out.println("Hello World");
}
}```
2. Compile the file using javac Filename.java.
3. Check the generated .class files
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Files with name Sample.class and sample.class should be present.
ACTUAL -
only one file is present.
FREQUENCY : always
- duplicates
-
JDK-8296656 java.lang.NoClassDefFoundError exception on running fully legitimate code
- Resolved