Documentation Generators Source Code Management Programming Tools

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Assignment in I.

T
Lance Paolo S. Sangangbayan
BSBA FM-2A

1.

2. In computer programming, a comment is a programmer-readable annotation in


the source code of a computer program. They are added with the purpose of making
the source code easier to understand, and are generally ignored
by compilersand interpreters.[1][2] The syntax of comments in various programming
languages varies considerably.

As well as of direct use to any programmer reading the source code,


comments are sometimes processed in various ways to generate
documentation external to the source code itself by documentation
generators, or used for integration with source code management systems
and other kinds of external programming tools.

The flexibility provided by comments allows for a wide degree of variability,


but formal conventions for their use are commonly part of programming
style guides.
3. A class can be defined as a template/blue print that describes the
behaviors/states that object of its type support.
A class can contain any of the following variable types.

4.

Local variables: Variables defined inside methods, constructors or


blocks are called local variables. The variable will be declared and
initialized within the method and the variable will be destroyed when
the method has completed.

Instance variables: Instance variables are variables within a class


but outside any method. These variables are initialized when the class
is instantiated. Instance variables can be accessed from inside any
method, constructor or blocks of that particular class.

Class variables: Class variables are variables declared with in a class,


outside any method, with the static keyword.

[]

Brackets are used to index into an array.

5. The Java Main Method. In Java, you need to have


a method named main in at least one class. The following is what must
appear in a real Java program. public static void main(String [ ] args)
{ UrRobot Karel = new UrRobot(1, 1, East, 0); // Deliver the robot to the
origin (1,1), // facing East, with no beepers.

6. System is a class in the java.lang package. out is a static member of


the Systemclass, and is an instance of java.io.PrintStream . println is a

method of java.io.PrintStream . This method is overloaded to print message


to output destination, which is typically a console or file.

You might also like