Selenium automation testing course with Java- Installation and First Java Program- class 3

Опубликовано: 14 Июнь 2025
на канале: Learn Java
162
5

You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.


class 3:-
=========
How to download and install java?
JDK: Java development kit
=========================
whenever I want to run or develop a program in java, JDK is essential.
The versions are from 1.0 to 1.24.
Please be informed that mostly we use 1.8/1.7 - stable version.
When you download JDK, the JRE and JVM will be made available along with it.
JDK download:
-------------------------
google JDK 1.8 download - oracle - windows - 164.35mb
downloads - java app - yes - next tab click and finish

For checking of Java installation in system:-
--------------------------------------------------------------------
verify cmd --- java -version

Introduction to IDE
================
IDE stands for Integrated Development Environment.
It is a software application that provides developers with a environment to write, compile, run, and debug code.

Key Components of an IDE:
======================
Code Editor: Where you write your code.
Compiler/Interpreter: Converts your code to machine language.
Debugger: Helps find and fix errors.
Code Suggestions and Syntax Highlighting.
Eclipse is a popular, open-source IDE, mainly used for Java development.

Downloading Eclipse:
---------------------------------
eclipse-- first download-- download packages-- windows 86(64)
Go to downloads-- eclipse committers -- extract all and click on normal folder --eclipse applications.

How to write a first java program?
class: It is a collection of methods and objects
method: set of actions to the performed (business logic)
object: used to call the methods and whenever we create an object it allocates memory inside the JVM during the run time.

PascalCase Naming Convention & Java Class Writing Rules
=======================================================
What is PascalCase?
PascalCase is a naming convention where:
1. The first letter of each word is capitalized.
2. No spaces, underscores, or hyphens are used.
Examples:
==========
StudentDetails
BankAccount
EmployeeSalaryCalculator
PascalCase is commonly used in Java for class names
===================================================
Rules to Write a Java Class (Using PascalCase):-

1. Class Naming Rules:
=======================
-- Every word starts with a capital example : CustomerOrder
-- Name cannot start with numbers or symbol example: 123Car
-- No special characters(Except $ and _)
- Meaningful name Should represent the purpose example : InvoiceGenerator not ABC Class
- No reserved words Avoid using Java keywords(class, int, if, etc.)
-- There should not be any spaces between 2 consecutive words

How to write the first java code?

1. project creation - open eclipse - file - new - project/java project - give the project name - click on finish.
2. package creation - right click on src- new - give the package name in domain format.
3. class creation - right click on project name - click on new - give the meaningful classname- check the main method - click on finish

Short cuts
============
System.out.println--- sysout ctrl+space

First program:-

package org.test;

public class FirstJavaProgram {


public static void main(String[] args)
{
System.out.println("Hello");
}
}

Output:-
Hello will be displayed in the console.

Please be informed that the main method is the entry point and all the instructions inside the main method gets executed as per the order.


На этой странице сайта вы можете посмотреть видео онлайн Selenium automation testing course with Java- Installation and First Java Program- class 3 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Learn Java 14 Июнь 2025, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 162 раз и оно понравилось 5 зрителям. Приятного просмотра!