Few Basic Things About Java That Beginners Should Know

Java is an interesting and popular programming language but often the beginners do not understand the basic syntax and hence give up the idea of progressing any further with the study.

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

 Here is a guide for the beginners to understand the java basics concepts and syntax.

Object

Anything which has different states and behavior can be classified into Object. For instance, a cat will have states such as breed, color as well as behavior like pouncing, eating and so on.

Class

It is nothing but the template that talks about the behavior and state supported by the objects belonging to that class.

Methods

There can be several methods in a class wherein the programmer can write the logic, manipulate the data and implement an action.

Instance Variables

Every object has its unique set of instance variables. Also, the state of the object is created through values assigned to these instance variables.

Before starting with the first Java program, there are few things that should be considered.

Case Sensitivity

Same word types in uppercase and lowercase will mean different in Java.

Class Names

When defining the class name, the first letter should be in Uppercase. In case there are several words, each inner word should be in Uppercase.

Method Names 

Unlike Class Names, all Method Names should start with the Lower Case letter. However, if there are several words used to form the Method Name, then every inner word’s first letter should be in Upper Case.

Program File Name

Program File and Class Name should match exactly

Public Static Void Main

The Program processing in Java starts from the main () which becomes the obligatory part of every Java Program.

Java Identifiers

There are several things to consider about the Identifiers such as:

All identifiers should start with a letter, underscore, and currency character

Post first character, identifiers can have several other combinations of characters

One cannot use a keyword as an Identifier

There are legal and illegal Identifiers

Identifiers are case sensitive

Java Modifiers

 There are several ways to modify methods, classes with the help of modifiers in Java.

Java Variables

There are three types of variables in Java

  • Local Variables
  • Class Variables
  • Instance Variables

 

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp
Share on email
Author Bio

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recommended for you
Connect With Us
Stay Connected

Subscribe to our newsletter today to receive updates on latest tech news, tutorials SEO tips many more.

Latest Articles
Featured image
Business

The Rise of Virtual Assistants (Infographic)

Small companies and start-up businesses resort to hiring virtual assistants as a solution to the limited time they have available. Here are some of the trends of why hiring or being a virtual assistant may be a good idea:

Free hub for guest blogging nerds and newbie writers

  • Submit Guest Post
  • Share your Knowledge
  • Build your Backlinks
  • Advertise your products
  • Make money by writing
Subscribe to our newsletter today to receive updates on latest tech news, tutorials SEO tips many more.