Java Programming For Beginners: Step By Step Lesson #2 || Creating Our First Project And Package (By @kaffy22 - The Code Girl)

in #utopian-io6 years ago (edited)

What Will I Learn?

  • You will learn How to intract with Eclipse IDE
  • You will learn how to create your first Java Project
  • You will learn how to create package for your Projects.

Requirements

  • Computer system
  • JDK must be installed
  • Eclipse IDE

Difficulty

  • Basic

Welcome back, budding programmers. Like I said earlier, programming is not so hard as many people make it seems. You just have to be focused and committed and in no time, you're gonna make a great programmer.

Today, we are going to write our very first java program. I've listed above all you need and if you followed my post yesterday, then you'll understand where we are.

A quick recap of the previous lesson here

Let's start guys!

  • Open your Eclipse IDE

Let's launch our Eclipse IDE app to get started. Don't get scared, I'll be showing you every step with screenshots. That's the purpose of this tutorial - it's meant to guide you from the very beginning to the end. Let's go.

lesson 1.jpg
That's how our Eclipse IDE looks.

  • Creating Our Java Project

Creating our Java project is as simple as listed below .

  • Click on File at the top menu and select New
  • From New to Java Project

lesson 1e.jpg

A new small window appear. Input your project name and click on Finish and we are all set.

lesson 1a.jpg

Now, I'll like us to be storing each project we're gonna be working in one single package. A package simply houses projects. That's it.

  • Creating a package for our projects

To create a package, the steps are as simple as listed below .

  • Right-click on the project we just created. And choose a new Package. Screenshot below.

package.jpg

On the new window that appears, input your desired name for the project. Here I named my package FirstPrograms. take note of something, You're not permitted to leave space in your project name. Just write all the words together as one. You can separate each word from the other using Capital letter to begin each word. Click on Finish and we all set.

package 2.jpg

See our new project package below.

package 3.jpg

You can create as many packages as you wish. You can also choose to be creating new package for every Java Application you're writing. However, I will like us to be saving our works inside this one package.

  • Creating Project Class

If you've reading some books about Java Programming before, you already know what a class means in Java. Class houses objects. Now let's create our first class.

  • Follow the same method you used in creating a package but this time, choose class instead.

class.jpg

Insert the Class name with the same rules used when naming the package. Tick the box for public static void

class 3.jpg

Behold! We are set to go! Simple, right? Yes!

class 4.jpg

This is where we are going to stop for now, we'll continue in the next class. Stay with this blog.


Like I do tell you guys, programming is not hard, programming is not easy, your approach determines which of its side programming shows to you - easy or hard


Be sure to leave a comment and upvote. A resteem is also appreciated.


coding.jpg


Curriculum



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Hi, these are the reasons your contribution was rejected

  • The linked repository is wrong, make sure to choose the repository of the project your tutorial is about and not your own repository; for general Java tutorials please use the repository https://github.com/dmlloyd/openjdk.
  • Tutorials about simple on-screen instructions will not be accepted; simply showing how to create a new project with Eclipse cannot be considered a valid contribution to Utopian.io.

I recommend you read the rules before contributing again in the future.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 68666.90
ETH 3251.63
USDT 1.00
SBD 2.67