ITSS 3312 Lecture Notes - Lecture 3: Pus, Method Stub

16 views3 pages

Document Summary

Values = new int[3];// in order to define the array, u have to use. System. out. println(values[2]); public static void main(string[] args) { int value = 7; // here ur just assigning a value to a variable int[] values; // [] represents as array. where u can store multiple. // it says 3 items, but the numbering starts off at 0,1 and 2. values[0]=10; values[1]=20; values[2]=30; System. out. println(values[0]); // the "0" is calling the 1st item in the public class arrays { values under one variable. variable = "new" and add a data type with the # of items in the array. list. //but there is a much simpler way of doing the same thing above int[] numbers= {10,20,30}; for (int i =0; i

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents