Utility classes

Utility classes

Professional Development

8 Qs

quiz-placeholder

Similar activities

BASICS OF JAVA

BASICS OF JAVA

Professional Development

7 Qs

SQL Sesi 1

SQL Sesi 1

Professional Development

10 Qs

SQL JOINs 2

SQL JOINs 2

Professional Development

10 Qs

JTI Blockchain Bootcamp Session 5

JTI Blockchain Bootcamp Session 5

Professional Development

9 Qs

Programming Knowledge Quiz (Medium)

Programming Knowledge Quiz (Medium)

5th Grade - Professional Development

10 Qs

Intranet

Intranet

Professional Development

10 Qs

SQL Programming

SQL Programming

4th Grade - Professional Development

10 Qs

Java Certification

Java Certification

Professional Development

10 Qs

Utility classes

Utility classes

Assessment

Quiz

Computers

Professional Development

Easy

Created by

Rolland Gavriliță

Used 2+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is true about the java.lang.Object class?

It is the superclass of all classes in Java

It can only be used with primitive types

It cannot be extended by any other class

It provides no useful methods

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is used to obtain the current date with the LocalDate class?

LocalDate.getCurrent()

LocalDate.ofNow()

LocalDate.currentDate()

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the LocalDateTime class represent?

A timestamp in milliseconds.

A date with time zone information.

A date and time without any time zone.

Only a time value.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a key difference between java.util.Date and java.sql.Date?

java.util.Date represents only the date, while java.sql.Date includes time.

java.sql.Date is designed for SQL databases and typically ignores the time part, whereas java.util.Date includes both date and time.

java.util.Date is immutable, while java.sql.Date is mutable.

They are functionally identical.

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which class is typically used to represent a precise point in time (including date and time with nanosecond precision) for SQL databases?

Date
Datetime
Time
Timestamp

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method of the Random class is used to generate a random integer?

nextLong()
nextDouble()
nextFloat()
nextInt()

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In which package is the Scanner class, used for reading input from the user, located?

java.util
java.text
java.io
java.lang

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method in the Math class returns the maximum of two numbers?

sum
average
min
max