Skip to content
Dr James Froggatt
  • Website security (& ethical hacking)
  • Web programming services
  • Website development
  • Prices
  • Blog
  • Contact
  • Toggle website search
Menu Close
  • Website security (& ethical hacking)
  • Web programming services
  • Website development
  • Prices
  • Blog
  • Contact
  • Toggle website search

Java

IF ELSE statement

  • Post author:admin
  • Post published:November 21, 2011
  • Post category:Decision statements
  • Post comments:0 Comments

Outputs: More than 80 bananas. As soon as the if else statement is true, that's the option that's taken.

Continue ReadingIF ELSE statement

Nested if statements

  • Post author:admin
  • Post published:November 21, 2011
  • Post category:Decision statements
  • Post comments:0 Comments

This outputs: More than 20 bananas More than 80 bananas

Continue ReadingNested if statements

Constructors

  • Post author:admin
  • Post published:November 21, 2011
  • Post category:Basics/Constructors
  • Post comments:0 Comments

Allows initialization of variables as soon as an object is created. You make a constructor in very much the same way as a method, with the exception that the method…

Continue ReadingConstructors

Multiple methods and instances

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Class Files
  • Post comments:0 Comments

The above program uses methods from the cat class, so we create a new object of that class so we can use the methods within the cat class. We pass…

Continue ReadingMultiple methods and instances

Passing parameters to methods in another class

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Class Files
  • Post comments:0 Comments

So the above program creates a new scanner, then takes the input from the scanner and puts it in a string called 'name'. This string is then executed in the…

Continue ReadingPassing parameters to methods in another class

Using multiple classes

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Class Files
  • Post comments:0 Comments

jamesprogram.java In the above we create a new cat object called catObject. Once we have created a new object, we can access the methods of that class (simpleMessage()) in this…

Continue ReadingUsing multiple classes

While loop

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Decision statements
  • Post comments:0 Comments

Outputs: 0 1 2 3 4 5 6 7 8 9

Continue ReadingWhile loop

Switch statement

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Decision statements
  • Post comments:0 Comments

Continue ReadingSwitch statement

If statement

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Decision statements
  • Post comments:0 Comments

Continue ReadingIf statement

Increment Operators

  • Post author:admin
  • Post published:November 20, 2011
  • Post category:Math Operators
  • Post comments:0 Comments

... gives the same output as The output we get is 5. This is known as pre-incrementing. Post-incrementing (horses++) the above would output 4 because it's outputting before it's incrementing,…

Continue ReadingIncrement Operators
  • Go to the previous page
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • Go to the next page

Search

Recent

  • Project Mysql Connection using Javascript April 6, 2025
  • Make grass than bends September 24, 2022
  • Making a png sprite map in InkScape (for later use in Javascript Game or any other game) September 24, 2022

Categories

  • AJAX
  • Android Development
    • Activities and Intents
    • Android Examples
    • Big Nerd Ranch Notes
    • Fragments
    • Program Anatomy
  • CSS
  • GIT
  • HTML
  • Inkscape
  • Installations
    • VBulletin5
    • Wordpress
    • XAMPP
  • Java
    • "this" keyword
    • Abstract Classes & Interfaces
    • Arrays
    • Class Files
      • Abstract classes & methods
      • Final
      • Public, private, this
      • Static
      • Time Class
    • Compostition
    • Conditional operators
    • Constructors
      • Basics
      • Overloading Constructors
    • Decision statements
    • Enumeration
    • Inheritance
    • Inner classes
    • Interfaces
    • Java GUI
    • Java I/O
    • Keywords
      • Static
      • Super
    • Loops
    • Math Operators
    • Methods
      • Implicit & Explicit Parameters
      • Overloading
      • Overriding
      • Static Methods
      • Substring()
      • toString
    • Object Reference Preservation
    • Objects
      • Basics
      • Examples
    • Reference Types vs Primitive Types
    • Simple Programs
    • Specific Concepts
    • Variables
      • Basic Variables
      • Static variables
      • Variable Scope
  • Javascript
    • NodeJS
  • Javascript HTML DOM
  • Metatrader
  • Miscellaneous
    • Cooking recipes
    • DIY E-liquids
    • Go Pro 2
    • Holidays
    • Oakham School
    • Out and about on Android
    • Survivors Manchester
    • Trading
    • Wordle
    • Wordpress Stuff
  • Notepad++
  • PHP Programming
    • PHP Objects
    • PHP security
  • PMF
  • Python and Neural Networks
    • Latex
    • Lists and Arrays
    • Manipulating CSV files
    • Neural Network Notation
    • Sigmoids and tan
  • React and Node.js
  • SQL & Databases
    • SQL Specifics
    • World Map Manipulation

Copyright James Froggatt 2017-2020