#8 Java Practice Questions 1 - Java Introduction (Hindi)

preview_player
Показать описание
Java Basics: Java Main Method, Simple Java Hello Program, and More!

Welcome to this Java tutorial where we cover essential Java concepts for beginners! In this video, we walk through some of the most commonly asked Java interview questions related to Java programming basics, including the Java main method, Hello World program, and more. Whether you're new to Java or refreshing your skills, this video will help you understand key topics like:

👉🏻 What is the main method in Java? Learn its syntax and its role in the execution of Java programs.
👉🏻 Correct order of elements in a Java program (package, import, class, main method) and its importance.
👉🏻 Understanding the entry point of a Java program through the public static void main(String[] args) method.
👉🏻 Key Java programming exercises that will help you practice basic concepts and improve your coding skills.

Java Practice Problems:
We also tackle basic Java practice questions that are frequently asked in interviews, like:

👉🏻 What happens if you declare the main method as non-static?
👉🏻 Syntax of the main method and the impact of different declarations.
👉🏻 Writing Java programs using multiple output methods for various use cases.

This video is perfect for beginners looking to strengthen their understanding of Java basics and prepare for interviews.

🔥 Learn Java from Scratch
If you're a Java beginner, check out our full Java Tutorial for Beginners playlist here for in-depth lessons and more practice problems to enhance your coding skills.
📘 Java Programming Exercises for Beginners

Want to dive deeper into Java programming exercises? Start practicing with the questions provided in the video to master your understanding of Java syntax and logic.

------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

📞 For more details Call or What's App : +91 98887-55565, +91 62838-30308

------------------------------------------------------------------------------------------

◾◼️ Connect With Us On ◼️◾

------------------------------------------------------------------------------------------

🔖 Tags/Keywords:
#javatutorial #javaprogramming #javatutorialforbeginners #java #javabydeepak #javadevelopment
Рекомендации по теме
Комментарии
Автор

sir g package or access modifier kiyon nahi padaya abhi tak
please in dono topic kai tutorial bh upload kardejeya

dotyshorts
Автор

sir DBMS & Software project management pe video banayena, ,, aap se ye subject padne hai... aap bahut achha padate ho..

mmaaddyyforyou..
Автор

Q.1(ans) - C 0:18
Q.2(ans) - C 0:52
Q.3(ans) - B 1:24
Q.4(ans) - Nehi hua sir😞 1:49
Q.5(ans) - D 2:45
Q.6(ans) - A 3:43
Q.7(ans) - Nehi hua sir😞 4:28

OmPrakashDas-
Автор

Sir python ki course bi banayiyay plzz basic

ITtree-wsqs
Автор

8) class Main {
public static void main(String[] args) {
String name="deepak";
int rollno=101;
System.out.println("my name is deepak & MY ROLLNUMBER IS 101");
}
}

SouravKumar-ocqu
Автор

7) class Main {
public static void main(String[] args) {
System.out.println("hello me \n i love you");
}
}

SouravKumar-ocqu
Автор

Questions 1
Answer c

Question 2
Answer c

Question 3
Answer b

Question 4
Answer c

Question 5
Answer d

Question 6
Answer a

Question 7
Answer
class MainApp
{
public static void main(String[] args)
{
System.out.println("Hello Sir\nI love Java");
}
}

Question 8
Answer
public class MainApp1
{
public static void main(String[] args)
{
String name = "Deepak";
int rollno = 101;

System.out.print("My name is "+name+" & my rollno is "+rollno+"\n");

System.out.println("My name is " + name + " & my rollno is " + rollno);

System.out.printf("My name is %s & my rollno is %d%n", name, rollno);
}
}

bhupinderkaur
Автор

😘😘😘😘Thank you sir for uploading these types of knowledgeful videos. i posted all the questions answer please like if it correct. 💘💘💖💖

1. which of the following statement is correct regarding the origin of java
c. Java was initially called Oak and was developed in 1995 by Sun Microsystems

2. What is the correct order of elements in a basic java program
c. package, import, class, public static void main

3. In the following java program what does the public static void main(String[] args) method represent ?
b. The entry point of the program

4. If a java program has multiple classes, which of the following is true about the class containing the main method ?
c. It can have any name, but the class with the main method must be executed

5. Which of the following main method syntax is incorrect ?
d. public static void main(String args)

6. What happens if you declare the main method as non-static in java ?
a. The program will compile but it will fail to execute

7. Write a java program that prints the following using only one System.out.println() statement

class MainApp
{
public static void main(String[] args)
{
System.out.println("Hello Sir\nI love Java");
}
}

8. Write a java program that declares the following two variables:
String name = "Deepak";
int rollno = 101;
The program should print the following output:
My name is Deepak & my rollno is 101
You must use all the three output methods in java:
print()
println()
printf()

public class MainApp1
{
public static void main(String[] args)
{
// Declare the variables
String name = "Deepak";
int rollno = 101;

// Using print() method
System.out.print("My name is "+name+" & my rollno is "+rollno+"\n");

// Using println() method
System.out.println("My name is " + name + " & my rollno is " + rollno);

// Using printf() method
System.out.printf("My name is %s & my rollno is %d%n", name, rollno);
}
}

devkumarsaini
Автор

Question 1 - c

Question 2 - c

Question 3 - b

Question 4 - c

Question 5 - d

Question 6 - a

Question 7
class MainApp {
public static void main(String[] args) {
System.out.println("Hello Sir\nI love Java");
}
}

Question 8
public class MainApp1 {
public static void main(String[] args) {
String name = "Deepak";
int rollno = 101;

System.out.print("My name is "+name+" & my rollno is "+rollno+"\n");

System.out.println("My name is " + name + " & my rollno is " + rollno);

System.out.printf("My name is %s & my rollno is %d%n", name, rollno);
}
}

DPGamer
Автор

First one is -> C, Second one is -> B, Third one is -> B, Fourth one is -> C, Fifth one is -> D, Sixth one is -> D, Seventh one is -> System.out.println("Hello Sir!\nI Love Java");, Eight one is -> System.out.println("My name is " + name + " & my rollno is " + rollno);, System.out.print("My name is " + name + " & my rollno is " + rollno);, System.out.printf("My name is " + name + " & my rollno is " + rollno);

deepakgupta
Автор

hello dear Deepak sir
I'm very big fan sir
I'm already subscribe your YouTube channel

please sir....
I'm waiting for your channel in software testing automation selenium webdriver with java in basic to advanced full course❤❤❤

sandipverma
welcome to shbcf.ru