Bahaddin Ahmadov

Greenhorn
+ Follow
since Aug 23, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bahaddin Ahmadov

Why this code makes exceed Stack limits but not Heap limits? Why Not OutOfMemoryError, but it gives StackOverFLowError?
I did what you say, but after 3639 attempts i again gives stackoverflow : even i returned value and there is logical ending :

Which Mock Exams could you recommend me?
Are "Optional labels" like an example below are widely/rarely used in OCA exam?

At the example below, stack exceeds its limit because each time create() method is called and it creates "my" reference in stack. But the question here is in phylosophy. After the first create(), at the second time of create() calling, WHY JVM just dont overrides the "my" reference ? As I understand, It creates so many "my" references in stack memory , this is why it exceeds its limit. If my version would be true approach, I would get an OutOfMemory error rather than stackoverflow.

Thank you.

Why class variables dont be requirred to be initilized? I want to see compile error here, but compiler sets 0 for x. If it would be inside method (so local variable) , compiler would give compile time error. My question here is, why compiler differentiates in these case?

3 months ago
Thank you for comments. They all made my day. So helpfull
As we know that, firstly we compile "javac filename.java", then JDK generates filename.class file and to run bytecode we use "java filename.class". But I cannot understand, when I run "java filename.class" I got ClassNotFoundException, but When I run "java filename.java" I got the result. Why, it runs not bytecode, but raw *.java file?