Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway
  • Mark post as helpful
  • send pies
  • Report post to moderator
Do you want to:
  • learn Java better?
  • contribute to an open source community project?
  • help someone learn Java better?
  • learn/follow the generally accepted Java programming practices?
Then join and/or follow along with the Ranch Corral. No previous experience required.
There will be programming tasks for all skill levels implemented in different ways.
The goal is to have a fun learning project for all involved. You should therefore follow all the codes of conduct defined by Code Ranch.
This is also 100% volunteer based. Please be patient as we go. Not everyone willa be available at the same time and not everyone will have the same skill level/background.

We will be making game(s) and/or app(s), along the way we will learn some Java concepts and common/suggested programming practices.
You will probably be exposed to concepts like:
  • collections
    • arrays
    • lists
  • lambdas and streams
    • useful operations for collections, loops and more
  • file input and output
  • sql/jdbc
  • loops and decision structures
  • user input

Let's get started

Experienced user/Java programmer? Skip to step 9

Table Of Contents:


  • Step 1 - Install Java
  • Step 2 - Your Path
  • Step 3 - hello world
  • Step 4 - two classes
  • Step 5 - interfaces
  • Step 6 - abstracts
  • Step 7 - altogether now
  • Step 8 - software
  • Step 9 - source control
  • Step 10 - source code format
  • Step 11 - optional plugins
  •  
    Step
    1

    Install Java

    You will need to download and install Java on your system.
    Everything we will be using/trying to do will should work with Java 8.
     
    Step
    2

    Your Path

    Setup your system's path so that you can run both java and javac from the command line.
    javac is the program which turns you java source code into java class files.
    java is the program which executes your java class files.

     
    Step
    3

    hello world

    Create the basic hello world program using only a plan text editor like Notepad, Notepad ++, Vim,Vi, VS code, etc.
    The hello world program is a starting problem which many programmers write in many different programming languages.
    The program should display the words "hello world" when executed.
    In using a plain editor you can learn/see all of the steps that many IDEs do for you behind the scenes.
    Also, there may be times when you are unable to find an/use an IDE on the system you are using.

     
    Step
    4

    two classes

    Add a second class which prints today's date to the hello world program. Put each class in it’s own package.
    Java uses packages and classes to organize the code. You may have a package for data access and a different package for user input.
    Often times you will need to access the date and/or time when you are programming. Java provides a library/class for you to do this.

     
    Step
    5

    interfaces

    Create an interface named Welcome with a method named greeting.
    Create a program which implements the interface.
    An interface in the Java programming language is an abstract type that is used to specify a behavior that classes must implement.

     
    Step
    6

    abstracts

    Create a abstract class named leaving with an abstract method named goodbye.
    Create a program which extends the leaving class and overrides the goodbye method.
    An abstract class, in the context of Java, is a superclass that cannot be instantiated and is used to state or define general characteristics.

     
    Step
    7

    altogether now

    Create a single program which does steps 3 to 6.
    Now that you are able to do some things separately, create a program that brings this altogether.

     
    Step
    8

    software

    Install an IDE such as IntelliJ or Eclipse.
    There are many different IDEs which people use for Java development. IDEs are really helpful when creating production code.
    Two of the more popular IDEs are IntelliJ and Eclipse. There is no wrong choice for an IDE and there is no right choice.
    People like and dislike certain IDEs for their own reasons.

     
    Step
    9

    source control

    Sign up for a free GitHub account and get a git client. Git Bash and Git Desktop are fairly popular/common free git clients. Chances are your IDE can act as a git client as well.
    You should be able to do the following with your git client:
    • clone a repository
    • create a repository
    • commit to a repository
    With source control you can more easily have multiple versions of your code/product.
    Source control tools allow you have document code changes and helps with the separation production and development versions.

     
    Step
    10

    source code format

    Explore your IDE, figure out how to format the source code.
    Code that is formatted is usually much easier to follow/debug and read.
    Nearly all the time you or someone will have to go back and read the code at some point in time.

     
    Step
    11

    optional plugins

    Setup and install editorconfig plugin in your IDE.
    Explore editorconfig and other plugins which may interest you. Plugins could make your IDE unstable and/or use more memory.
    Not all IDEs are created equal and sometimes they could be missing a feature which greatly enhances it.
    Editorconfig takes steps to ensure work space/project settings stay with the project regardless of the IDE.


    Please be patient as we are still trying to figure things out as we start this project/process.
    More details and information to be determined, including suggesting when the project will begin.
    However a start date in September 2018 is not an unreasonable assumption.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!