Embarking on the Backend Development Journey: Starting With Core Java And Spring Boot

Embarking on the Backend Development Journey: Starting With Core Java And Spring Boot

BEGINING MY JAVA LEARNING JOURNEY: DAY-1 JAVA INTRODUCTION


1. What is Backend web development?

  • Back-end development means working on server-side software, which focuses on everything you can't see on a website. Back-end developers ensure the website performs correctly, focusing on databases, back-end logic, application programming interface (APIs), architecture, and servers.

2. What is Java?

  • Java is a object-oriented, Class-based, Secured, Platform-independent and General-Purpose Programming language.
  • Java was originally Developed by James Gosling at Sun Microsystems and released in 1995 as a core component of sun Microsystem's Java Platform.

3. Why Java programming Language is named java?

  • The language was initially called oak after an Oak tree that stood outside gosling's office.
  • Later the project went by the name green and was finally renamed Java, from java Coffee, A type of Coffee from Indonesia.

4. Why use Java?

  • Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
  • It is one of the most popular programming languages in the world
  • It has a large demand in the current job market
  • It is easy to learn and simple to use
  • It is open-source and free
  • It is secure, fast and powerful
  • It has huge community support (tens of millions of developers)
  • Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
  • As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa.

5. What is JDK?

  • JDK Stands for Java development Kit. JDK provides an environment to develop and execute the java program.
  • JDK is a kit that includes two things Development tools to provide AN environment to Develop Java Program.
  • JRE to Execute your java Programs.

6. what is JRE?

  • JRE stands for Java Runtime Environment.
  • JRE provides an Environment to only Run(not develop) that Java Programs onto Your Machine.
  • JRE is only Used by the end-users of the system.
  • JRE Consists of libraries and other files that JVM uses at runtime.

7. What is JVM?

  • JVM Stands for Java Virtual Machine which is a very important part of both JDK and JRE Because it is inbuilt in both.
  • Whatever Java program you run using JDK and JRE goes into the JVM and JVM is responsible for Executing the Java Program Line by line.

8.What are the top Java Features?

  • Java has several features that make it a popular programming language. Some of these features include platform independence, object-oriented programming, automatic memory management, robustness, and security.

9. How to Run a java Program in Command Prompt ?

  • Open the notepad and write a Java program into it.
  • Save the Java program by using the class name followed by .java extension.
  • Open the CMD, type the commands and run the Java program.

Let's create a Java program and run it using the Command Prompt

Step 1: Open the notepad

Step 2: Write a Java program that you want to compile and run. We have written the following code in the notepad.

Step 3: To save a Java program press Ctrl + S key and provide the file name. Remember that the file name must be the same as the class name followed by the .java extension.

Step 4: To compile and run a Java program, open the Command Prompt .

Step 5: In the Command Prompt window, write the following commands.

Step 6: To compile the Java program type the following command:

javac HelloWorld.java

Step 7: To run the Java program, type the following command.

java HelloWorld


10. Explain public static void main(String args[]) in Java.

public: the public is the access modifier responsible for mentioning who can access the element or the method and what is the limit. It is responsible for making the main function globally available. It is made public so that JVM can invoke it from outside the class as it is not present in the current class.

static: static is a keyword used so that we can use the element without initiating the class so to avoid the unnecessary allocation of the memory.

void: void is a keyword and is used to specify that a method doesn’t return anything. As the main function doesn’t return anything we use void.

main: main represents that the function declared is the main function. It helps JVM to identify that the declared function is the main function.

String args[]: It stores Java command-line arguments and is an array of type java.lang.String class.

11. what is Java Comments?

  • Comments can be used to explain Java code, and to make it more readable. It can also be used to prevent execution when testing alternative code.

Single-line Comments

  • Single-line comments start with two forward slashes (//).
  • Any text between // and the end of the line is ignored by Java (will not be executed).
  • This example uses a single-line comment before a line of code:

Example

// This is a comment

System.out.println("Hello World");

This example uses a single-line comment at the end of a line of code:

Example

System.out.println("Hello World"); // This is a comment

Java Multi-line Comments

  • Multi-line comments start with /* and ends with */.
  • Any text between /* and */ will be ignored by Java.
  • This example uses a multi-line comment (a comment block) to explain the code:

Example

/* The code below will print the words Hello World

to the screen, and it is amazing */

System.out.println("Hello World");


要查看或添加评论,请登录

Sakthi Kumar M的更多文章

社区洞察

其他会员也浏览了