Earlier quoted context omitted.
Java is great for exactly that reason. It gives students an introduction to compilation, runtimes, stacks and heaps etc. Perhaps you had a poor learning experience due to who/what was teaching you rather than Java? My second comp sci course in college (first if you count high school AP credits), taught me all of this, and prepared me for the "full details" of MIPS and C.
The point is, it's a terrible first language because it's impossible to actually understand what's going on even in a basic "hello world" program until halfway through the semester. So inevitably you have to start them off by saying "here's a bunch of noise that you don't understand, but that's OK, just copy and paste it" which is a terrible habit to reinforce. You need to understand * access modifiers (public/privat…
class Test {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
And then javac Test.java
java Test
The class acts as a kind of namespace here, you don't need to go into OOP concepts for hello world at all. The beginner will have to understand* Class is in file with the same name ¯\_(ツ)_/¯ and contains functions (maybe it'll help me later in organizing code?).
* Command line arguments (not strictly necessary concept but not too problematic either)
* Types - why is there String[] in the definition? (A must have in a statically typed language anyway)
* void - the function doesn't return anything (OK)
* public (not OK, some magic here)
* static (not OK, some magic here)
* Compilation vs. run step (a must have in a compiled language)
So IMHO there are just two concepts that could be thrown away. Or three, if you accessed CLI args from a library. But the meaning of public and static will come naturally when the students will learn about OOP.