JAVA

constructor in java

How to create classes or objects in JAVA

JAVA is a Programming language like Core PHP. In this article, you will learn how to create classes or objects in JAVA.

Example:-

public class MyClass {
  int x = 10;

  public static void main(String[] args) {
    MyClass myObj1 
conditional statements in java

How to Create Condition Statements in JAVA

Condition Statements are the same we use in PHP but the syntax is different in JAVA. In this article, you will learn How to Create Condition Statements in JAVA

Example:-

public class MyClass {
  public static void main(String[] args) {
    
java enum

How to Create Switch Statement in JAVA

In this article, you will learn How to Create Switch Statement in JAVA with a break. It works like in C language or Core PHP.

Example:-

public class MyClass {
  public static void main(String[] args) {
    int day = 
constructor

How to Create Constructors in JAVA

In this article, you will learn How to Create Constructors in JAVA.

Example:-

public class Car {
  int modelYear;
  String modelName;

  public Car(int year, String name) {
    modelYear = year;
    modelName = name;
  }

  public static void main(String[] args) 
java example

How to Create Input using JAVA

In this article, you will learn How to Create Input using JAVA. It works like in HTML and PHP

Example:-

import java.util.Scanner; // import the Scanner class 

class MyClass {
  public static void main(String[] args) {
    Scanner myObj = new