Learning Java , they all say easy.
as a Learn online at the Clip Ding Academy It's College students, I passed study at the Ding Ting Academy know a lot of friends who use Java. Now that many schools are teaching Java from other programming languages (mostly C + +), a study done in July 2014, up to the time of the survey, has 22 of the 39 top U.S. CS projects already using Java as an introductory course.
So what is it that makes Java stand out from the multitude of teaching languages? Looking at every aspect, we have found some clues:
The syntax is relatively simple (compared to C and C + +), with less difficulty (still compared to C and C + +). The simpler the syntax, the less the novice needs to master, which is no more than a boon for novices.
Java compared to some of the traditional teaching options, such as C and C + +, Comparison is not prone to error, because many operations will be automatically checked. If you want to access an array beyond its bounds or use an empty object to produce an exception, the program will tell you what went wrong with a nice stack trace (narrow the scope directly to the source file that caused the problem). In contrast, C and C + +, if you access a null pointer, the program explodes like a bomb without warning, without leaving you any useful hints (unless you're running in the debugger, so we have to learn to use the debugger, just in case). And if the C and C + + arrays go out of bounds, that's even more tragic, because in many cases, there are even cases where the values of the array elements in memory are somehow rewritten. Then you can only face the collapse of the program, stunned, completely helpless. This is absolutely minutes driving crazy a programmer's rhythm!
Having a garbage collector means that you don't need to manage memory yourself. After you create an object with the New keyword, it will remain in memory forever (as long as there is a reference anywhere). And when you're done with this object, the garbage collector will clean up the object for you.
Java is widely used in the industry, so in theory, the knowledge we learn in school can be translated directly into real work. The Tiobe programming indicator lists it as the second most commonly used programming language. Whether you agree with Tiobe's accurate analysis, but you have to agree with Java is widely used in this situation.
Java is object-oriented. You can create objects that contain data, and then write methods that describe the behavior that acts on that data.
It sounds so beautiful up there! But it's not complete.
Roundabout strategy
Almost all programmers write the first program in any language is "Hello world". What it does is show some messages (traditionally "Hello world"), and then exit, very simple. Here is the Hello World program written in Java:
View Sourceprint?
public class Hello {
public static void Main (string[] args) {
System.out.println ("Hello, World");
}
}
Some people who are completely unfamiliar with programming have doubts about it, and then if you are a teacher, hey, the trouble is coming. If you want to be able to explain everything to the students at once, you may become the straw that will crush the camel, so you'd better take a roundabout approach.
"Excuse me, what does public mean?" "-There's no need to think about this now, we'll go into it later.
"What is Class?" "-There's no need to think about this now, we'll go into it later.
"What does static mean?" "-There's no need to think about this now, we'll go into it later.
...... And so on, so to speak.
But it is worth mentioning that, no matter what the content, we should break it down into a piece of easy to digest the part of understanding. Encapsulation (public keyword), Object-oriented programming (class and Static), arrays (string[]), and command-line arguments (args) These important knowledge should be explained to students in a timely manner. Of course, for those freshmen who are still in the early stages of programming, it would be too much to think of eating a big fat man. I know a lot of friends, they are definitely the best in other areas, but the problem of programming concepts are immediately one of the first two big. It's like a sudden introduction of this in algebra:
Once we know what these symbols mean, it doesn't seem so difficult to understand them. But for those who are only involved in this field, this is no more than a no-word Bible. Moreover, while roundabout tactics encourage students not to be discouraged immediately, but from another point of view, it is only superficial to show some kind of "magical" results, and did not analyze the principle of interpretation. But I want to say that if you want to grow into a real teacher, this approach should be contrary to your idea. such as the example of Hello World,
Java is strictly object-oriented and requires that each function (or "method", in Java) be placed in a class. If you have not read execution in the Kingdom of nouns this excellent article, then I highly recommend you to read it. Its main content can be summed up as, "advocating object-oriented programming is like tailoring clothes for guests." It is definitely a bad "call" to explain the object-oriented design principles to those who are the concepts of the IF statement and for-loop, or a whole new set of pastes. Focus on breaking the work down into a small fragment that can be written as a function, and then we'll go back to what OOP is.
Java stipulates that all objects are allocated in the form of heaps, so all object variables are pointers. Now you need to explain the difference between a value and a reference, as if the behavior of int, Boolean, float and strings is different when assigning and comparing. Similar to these derived problems together constitute a coherent interpretation of the workings of the mental model-as programmers this is necessary-but the process is extremely difficult.
Java may be really a great programming language for developers, regardless of size, but this guy is definitely not friendly to beginners.
So what language should we teach?
In this case, then someone will ask, I first learn some simple concept, and then on the basis of this further study Java, not become?! But I'm sorry, Java means that my concubine can't do it!
So what do we do? Here are two sensible ways to start a programming path that may give you a sense of clairvoyant:
Low-level starting point, and then step by step to improve the difficulty. Teach you how to use the computer so that you can write some simple programs in C language directly. Then on this basis, to build a higher level of computer science structure system.
A high level of starting point, and then step by step to reduce the difficulty. By teaching computer science and a programming language, this programming language is very easy to implement and does not have to worry about the details of the underlying machine, such as Python, which is a good choice because it is not affected by the need to load Java directly. Then the decomposition of the computer is how to implement these theories step-by-step.
Now that the 2nd method is becoming more and more popular, the research--python mentioned at the beginning of this article has gone beyond the fact that Java has become the most widely used programming language to begin with.
Whichever method you choose, the key is to keep your students interested. If you're choosing a low-level starting point, you can use the Arduino or robotics suite so that students can watch the code they write in the physical world. When I first started writing code for a robot team in C, I was fascinated by the fantasy world: watching 120 pounds of steel pipes and turning motors as I wrote the code, it was really amazing and incredible to me. If you choose a high-level starting point, you might want to use the resources in the library to create video games or other graphics programs.
Programming is particularly incredible. In addition to your imagination and ability to express, there is nothing else to limit you. Find the student's interest in the entry point, teaching and learning, from easy to difficult, progressive, teach them how to use the tools, to give the fish as the grant of fishing, let them in the programming world of free and crazy growth.
If you want to learn more, IOS Android Expertise, you can go to the domestic comparative professional of the Clip Ding Academy online Exchange learning. I hope it will be of help to you.
How to effectively introduce programming languages to novice programmers?