Bahaddin Ahmadov

+ Follow
since Aug 23, 2021
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
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", 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" I got the result. Why, it runs not bytecode, but raw *.java file?