Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
strings
:
Мова контенту: English
Русский
What will the following code print out to console? public class Exam { public static void main(String[] arg) { Object obj = null; String str = new String("str"); str = (String) obj; obj = new String("obj"); System.out.print(obj + ", " + str); } }
strings
What will be printed after the following code is executed? public class Main { public static void main(String[] args) { String strA = "text"; String strB = "text"; strA += "1"; strB += "1"; System.out.println(strA != strB); strA = "text1"; strB = "text1"; System.out.println(strA != strB); } }
strings
What is the result of the following program execution? public class A { public static void main(String[] args) { Boolean b1 = true; Boolean b2 = new Boolean("/false"); String s1 = "" + 1 + '+' + 1 + '=' + (1 + 1) + " is "; String s2 = s1 + b1 + '/' + b2; System.out.println(s2); } }
strings
Is it possible to inherit from the class java.lang.String?
strings
What is the result of the following code execution? class Main { public static void main(String[] args) { String first = new String("quizful"); String second = new String("quizful"); System.out.println(first == second); System.out.println(first.intern() == second.intern()); } }
strings
The following string variable is defined: String s = "abc"; Which of the following operations are allowed?
strings
What is the result of the following program execution? public class Main { public static void main(String[] args) { String testString = "This is a test string."; String[] resultArray = testString.split(" "); System.out.println(resultArray.length); } }
strings
What is the following code execution result? public class Commentator { public static void main( String[] args ) { /*System.out.println( "Line1" ); System.out.println( "Line2" );*/ //System.out.println( "Line3" ); System.out.println( "Line4" );// System.out.println( "/*Line5*/" ); System.out.println( "//Line6//" ); } }
strings
What happens as a result of attempts to compile and run the program? class Quizful { public static void main(String[] args) { String a = "\u000a"; String d = "\u000d"; System.out.print(a + " " + d); } }
strings
What will be displayed on the console? public class Main { public static void main(String[] args) { int a = 10; int b = 100; double c = (double) (a/b); String str = String.format("%1.4f", c); System.out.println(str); } }
strings
← Попередня
1
2
3
4
5
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести