public class Main {
public static void main(String[] args) {
String s = "abc";
int sum = 0;
for (char c : s.toCharArray()) {
sum += c;
}
System.out.println(sum);
}
}
Day 17 - HITech
Quiz
•
Computers
•
Professional Development
•
Easy
Venkatesh iGen
Used 4+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
String s = "abc";
int sum = 0;
for (char c : s.toCharArray()) {
sum += c;
}
System.out.println(sum);
}
}
294
297
300
303
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
String s = "a1b2c3";
int sum = 0;
for (int i = 1; i < s.length(); i += 2) {
sum += s.charAt(i) - '0';
}
System.out.println(sum);
}
}
6
3
5
4
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
int[] arr = {513, 46, 29};
int max = 0;
for (int num : arr) {
while (num > 0) {
max = Math.max(max, num % 10);
num /= 10;
}
}
System.out.println(max);
}
}
6
5
9
3
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
String s = "6589";
char[] arr = s.toCharArray();
char temp = arr[0];
arr[0] = arr[arr.length - 1];
arr[arr.length - 1] = temp;
System.out.println(new String(arr));
}
}
6589
9586
9865
9568
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
int[] a = {10, 20, 30};
int sum = 0;
for (int i = 1; i < a.length; i++) {
sum += a[i] - a[i - 1];
}
System.out.println(sum);
}
}
20
10
30
40
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
String[] s = {"abc", "de", "fghi"};
int count = 0;
for (String str : s) {
count += str.length();
}
System.out.println(count);
}
}
4
8
5
9
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
public class Main {
public static void main(String[] args) {
int n = 237541;
int count = 0;
while (n > 0) {
int d = n % 10;
if (d == 2 || d == 3 || d == 5 || d == 7) count++;
n /= 10;
}
System.out.println(count);
}
}
20 questions
first round quiz
Quiz
•
Professional Development
20 questions
UAS Android
Quiz
•
Professional Development
20 questions
Data Structure
Quiz
•
Professional Development
20 questions
Pre-Assessment: Java Basics
Quiz
•
Professional Development
21 questions
Exceptions and Classes
Quiz
•
Professional Development
20 questions
Java Quiz-1
Quiz
•
Professional Development
17 questions
Java Basics
Quiz
•
Professional Development
23 questions
First Quiz
Quiz
•
Professional Development
25 questions
Equations of Circles
Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)
Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System
Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers
Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons
Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)
Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review
Quiz
•
10th Grade