Top Java Quiz Questions ☕️
رفتن به کانال در Telegram
🎓🔥💾 If you want to acquire a solid foundation in Java and/or your goal is to prepare for the exam, this channel is definitely for you. 🤳Feel free to contact us - @topProQ If you are interested in Python https://t.me/topPythonQuizQuestions
نمایش بیشترکشور مشخص نشده استفناوری و برنامهها29 704
2 880
مشترکین
-224 ساعت
+127 روز
+2930 روز
آرشیو پست ها
Code snippet:
3: byte a = 40, b = 50;
4: byte sum = (byte) a + b;
5: System.out.println(sum);
How many times will the following code print "Hello World"?
Code snippet:
3: for(int i=0; i<10 ; ) {
4: i = i++;
5: System.out.println("Hello World");
6: }Code snippet:
3: boolean x = true, z = true; 4: int y = 20; 5: x = (y != 10) ^ (z=false); 6: System.out.println(x+", "+y+", "+z);
Code snippet
1: public class TernaryTester {
2: public static void main(String[] args) {
3: int x = 5;
4: System.out.println(x > 2 ? x < 4 ? 10 : 8 : 7);
5: }}Code snippet:
1: public class Salmon {
2: int count;
3: public void Salmon() {
4: count = 4;
5: }
6: public static void main(String[] args) {
7: Salmon s = new Salmon();
8: System.out.println(s.count);
9: } }Given the class above, which of the following calls print out 'Blue Jay'?
Code snippet:
public class BirdDisplay {
public static void main(String[] name) {
System.out.println(name[1]);
} }Code snippet:
6: List<String> list = new ArrayList<String>();
7: list.add("one");
8: list.add("two");
9: list.add(7);
10: for(String s : list) System.out.print(s);Code snippet:
LocalDate date = LocalDate.parse("2018-04-30", DateTimeFormatter.ISO_LOCAL_DATE);
date.plusDays(2);
date.plusHours(3);
System.out.println(date.getYear() + " " + date.getMonth() + " "+ date.getDayOfMonth());Code fragment:
3: ArrayList<Integer> values = new ArrayList<>(); 4: values.add(4); 5: values.add(5); 6: values.set(1, 6); 7: values.remove(0); 8: for (Integer v : values) System.out.print(v);
Code snippet:
4: List<Integer> list = Arrays.asList(10, 4, -1, 5); 5: Collections.sort(list); 6: Integer array[] = list.toArray(new Integer[4]); 7: System.out.println(array[0]);
