Skip to content

robertocantarelli/java-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

java-core

  1. Download a development environment such as "Eclipse" or "Netbeans".

  2. Create a new class selecting new/class.

  3. A class remodels a real world projects or code into code.

  4. Start writing the code importing Java libraries

##java default libraries.

import java util.Scanner;

import java.util.*;

creating a class,declarating methods.

public class "classname"{

  • methods declaration

private "datatype(float,int etc)" "method name";

  • methods are always private, except the main method.

  • Once methods are declarated, you must generate constructors

  • right click/source/generate constructor using fields

  • The contstructor is now generated.

public "classname"{

  • Now you can carry out different tasks, for example printing on the screen a sum of numbers.

}

  • Now you need to create a main method, where the code will be executed.

public static void main(String[] args){

  • "static" means that this method is shared with every object with the name of this class.
  • Create now a new object.

"classname" "newname" = new "classname"();

}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published