Throughout chapter 1 i learned the basic history of Java and how it has evolved. Java version 1.02 had 250 classes and they describe it as being "Slow". Java 1.1 came along and it is described as being "A little faster, More capable, friendlier. They say it has a better GUI. Java 2 (versions 1.2-1.4) is believed to be much faster, powerful, and for new enterprise and mobile applications it becomes the language of choice. Java 5.0 (versions 1.5 and up) is described as being More powerful, and also easier to develop with.
I also learned about the Code Structure in Java. In Java there are things known as Source Files. On these Source Files there holds one class, each class represents a piece of the program. One of the main things of the class is that it needs to be written within a pair of curly braces. We also learned about the classes. Which are part of the Source Files. These classes mainly seem to just hold methods. You need to make sure to put the methods inside of the curly braces which are within the curly braces from the script files. This brings us to the last part of the code structure,...Methods. Methods are just set of instructions or statements that you would like a function or a process to be carried out. After i learned about the Code Structure it goes onto telling you about when JVM opens how it will read all of the code. It starts with the classes,then it will go and look in the curly braces and will do all of the commands that are to be done within the braces. After this it tells you about Mains. Mains are where the bulk of your code is. Mains are very important because you need to have a main to let the program start to run.
Once i knew the basics about how the Code Structure in Java works, it then went to go on and tell about what specifics you can write within Java. More specifically what you can write in the Main. In a main they say you can write anything that makes the computer carry out a program. So the code that you write can tell the JVM to "do something", to "do something again and again" and then "do something under a a condition".
Activities throughout Chapter 1:
The First activity that you are given in Chapter 1 is "Look how "easy" it is to write Java." In this Activity i was given several Lines of code (Ex. int size = 27;) and i was then given the task to guess what each line of code was doing. So for that example it would of been "declare an integer variable named "size" and give it the Value 27". For many this activity they might have found of it easy but for me i had a trouble completing it and found out many of my answers were not correct... This was the lines of code i was given, my answers are obviously in my packet which i cant get onto here.
The second Activity we were faced to do was "Coding a Serious Business Application" This activity was attempting to put all of my new Java "skills" to use with something practical. I was given a large section of code and was told that within it there is a flaw. The code will still compile and run but the output isn't 100% perfect. This was the section of code i was given...
No comments:
Post a Comment