summaryrefslogtreecommitdiffhomepage
path: root/java.html.markdown
diff options
context:
space:
mode:
authorJake Prather <JakeHP@Zoho.com>2013-06-29 22:56:22 -0500
committerJake Prather <JakeHP@Zoho.com>2013-06-29 22:56:22 -0500
commit0523de70a1335c036442863b6dc672d50157d66a (patch)
treeb598088880a4f6403ae668424fbb523324e1396f /java.html.markdown
parent9c9f2c6b9a50ccc7a987d3c9bf6fd26bd1cc3d15 (diff)
Update java.html.markdown
Diffstat (limited to 'java.html.markdown')
-rw-r--r--java.html.markdown12
1 files changed, 6 insertions, 6 deletions
diff --git a/java.html.markdown b/java.html.markdown
index 5f8aec2b..e14f356d 100644
--- a/java.html.markdown
+++ b/java.html.markdown
@@ -97,7 +97,7 @@ Read more here: https://en.wikipedia.org/wiki/Java_(programming_language)
array[1] = 1;
System.out.println(array[1]); // => 1
array[1] = 2;
- printf("%d\n", my_array[1]); // => 2
+ System.out.println(array[1]); // => 2
//Others to check out
//ArrayLists - Like arrays except more functionality is offered, and the size is mutable
@@ -139,10 +139,10 @@ Read more here: https://en.wikipedia.org/wiki/Java_(programming_language)
// Incrementations
int i=0;
- i++; //i = 1. Post Incrementation
- ++i; //i = 2. Pre Incrementation
- i--; //i = 1. Post Decrementation
- --i; //i = 0. Pre Decrementation
+ i++; //i = 1. Post-Incrementation
+ ++i; //i = 2. Pre-Incrementation
+ i--; //i = 1. Post-Decrementation
+ --i; //i = 0. Pre-Decrementation
///////////////////////////////////////
// Control Structures
@@ -288,13 +288,13 @@ Read more here: https://en.wikipedia.org/wiki/Java_(programming_language)
}
//Now..Later in the main / driver of your java program
-
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
//Call bicycle's constructor
Bicycle trek = new Bicycle();
+ //Manipulate your object
trek.speedUp(3);
trek.setCadence(100);
}