java block structure

6
Block Structure Block Structure Arthur David Anderson

Upload: ada-wou

Post on 20-Jun-2015

146 views

Category:

Software


3 download

DESCRIPTION

JAVA block structure is a starting point for the JAVA 101 class that I am writing for my CSE616 course.

TRANSCRIPT

Page 1: Java block structure

Block Structure Block Structure

Arthur David Anderson

Page 2: Java block structure

What is a BlockWhat is a Block

A block is the structure that defines the container of a method, class, or function.

In JAVA there blocks are defined by a signature and the brackets that surround the language.

Page 3: Java block structure

ExampleExample

Class calls: are used to bring external class parameters to the program that you are writing.

#import <Foundation/Foundation.h>

#import "NSData+base64.h"

Page 4: Java block structure

Example cont.Example cont.

Class Declaration: Classes are declared with a simple structure.

The first part is the class signature

class MyClass {

// variable declaration// method signature }

Page 5: Java block structure

Example cont.Example cont.

The second part of the class is the Curly braces that surround the class itself.

These define the code that the class uses.

class MyClass {

// variable declaration// method signature }

Page 6: Java block structure

ConclusionConclusion

There are many things that you can learn about JAVA but the first thing that you need to know is how to define and import Classes

You can not have a class without the use of a class declaration or the curly braces that define the boundary's of the class.

Everything that that is contained inside the braces are usable by the methods withing the class