0% found this document useful (0 votes)
4 views8 pages

K-Means Assignment Overview

The document defines arrays in programming and demonstrates how to declare and use one-dimensional integer and string arrays in Java. It shows how to assign values to array indexes, provides a short quiz on creating arrays, and summarizes the key points about declaring one-dimensional arrays and assigning values to indexes. The document concludes by thanking the reader and providing references for additional examples of one-dimensional arrays.

Uploaded by

api-283273513
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

K-Means Assignment Overview

The document defines arrays in programming and demonstrates how to declare and use one-dimensional integer and string arrays in Java. It shows how to assign values to array indexes, provides a short quiz on creating arrays, and summarizes the key points about declaring one-dimensional arrays and assigning values to indexes. The document concludes by thanking the reader and providing references for additional examples of one-dimensional arrays.

Uploaded by

api-283273513
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

By

: Mohammed H. Kurdi

10/27/14

Computer programming
Array
1

Introduction of content
Denition of array in programing.
Declaring One- Dimensional integer array

Given an array size


Assign a number to the index.

Declaring One- Dimensional string array.

Given an array size


Assign a word to the index.

+ Short Quiz.
+ Summary.

10/27/14

By : Mohammed H. Kurdi

Denition of array in programing



An array is a container object that holds a xed number of

values of a single type.

10/27/14

By : Mohammed H. Kurdi

Declaring One- Dimensional integer


array

Declaring integer :
Int ..[];
Create an array size:
= new int [];
Assing the integer to the rst index :
[..] = ;

10/27/14

By : Mohammed H. Kurdi

Declaring One- Dimensional string


array

Declaring integer :
String ..[];
Create an array size:
= new string [];
Assing the integer to the rst index :
[..] = ;

10/27/14

By : Mohammed H. Kurdi

Short Quiz

Create an array by using One- Dimensional as a following :


[Link] an array of integers by giving size (4) and assign these
numbers (45,66,35,87,100) to the index.
[Link] an array of string by giving size (5) and assign these
words (moh, boos, sea, red, two) to the index.
Comment : pot each number and each word in the rst index.

10/27/14

By : Mohammed H. Kurdi

Summary
Denition of array in programing.
Declaring One- Dimensional integer array
Given an array size
Assign a number to the index.

Declaring One- Dimensional string array.


Given an array size
Assign a word to the index.

10/27/14

By : Mohammed H. Kurdi

Thank You
These are the references that help you with a lot of examples

for one-dimensional array.


[Link]

[Link]

[Link]
[Link]

10/27/14

By : Mohammed H. Kurdi

You might also like