CodeWithHarry YouTube
13K subscribers
42 photos
12 files
158 links
CodeWithHarry is a YouTube Channel For Learning Programming Language with Fun
This is a fan made channel
Download Telegram
Your first programming language is _____
Anonymous Poll
16%
Java
7%
JavaScript
51%
C/C++
23%
Python
4%
Other / Comment
Do you guys use canva? And of course need premium for free?👇
Here are some Java multiple-choice questions that you can use for practice or testing:

1) What is the correct way to declare a variable in Java?
A. var x = 5;
B. int x = 5;
C. float x = 5;
D. string x = "5";

2) What is the correct way to print a string to the console in Java?
A. System.out.print("Hello, world!");
B. cout << "Hello, world!";
C. print("Hello, world!");
D. console.log("Hello, world!");

3) What is the correct way to open a file in Java?
A. File f = new File("file.txt");
B. open("file.txt");
C. fopen("file.txt");
D.
fs.open("file.txt");

4) What is the correct way to create an array in Java?
A. int[] array = {1, 2, 3, 4, 5};
B. array[] = {1, 2, 3, 4, 5};
C. Array array = {1, 2, 3, 4, 5};
D. int array[] = new int[5];

5) What is the correct way to access the third element of an array in Java?
A. array[3];
B. array(3);
C. array.get(3);
D. array{3};
JS handwritten Notes (1).pdf
58.3 MB
Javascript Handwritten Notes

Share this file as much as possible
Download Notes | CodeWithHarry
https://www.codewithharry.com/notes/