109.String formatting (Document)

109.String formatting (Document)

Professional Development

28 Qs

quiz-placeholder

Similar activities

fundamentos de javascript

fundamentos de javascript

Professional Development

25 Qs

computer science

computer science

KG - Professional Development

23 Qs

Chapter 7 Quiz

Chapter 7 Quiz

Professional Development

23 Qs

Базы данных_06.02

Базы данных_06.02

Professional Development

24 Qs

BTEC Coding & Logic

BTEC Coding & Logic

12th Grade - Professional Development

24 Qs

Linux Test Prep 1

Linux Test Prep 1

7th Grade - Professional Development

25 Qs

minecraft

minecraft

KG - Professional Development

24 Qs

MODUL 2 : IKON DAN FUNGSI DALAM MICROSOFT OFFICE WORD 2019

MODUL 2 : IKON DAN FUNGSI DALAM MICROSOFT OFFICE WORD 2019

KG - Professional Development

23 Qs

109.String formatting (Document)

109.String formatting (Document)

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

ANIL KUMAR

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How can you format strings in Java?

Using concatenation
Using printf()
Using split()
Using toString()

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the purpose of %s and %d in Java string formatting?

Decimal and string formatting
String and decimal formatting
Double and string formatting
String and date formatting

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How does the String.format() method work in Java for string formatting?

Modifies original string
Returns a new formatted string
Converts string to uppercase
Removes whitespace from a string

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does %9s mean in Java string formatting?

Left-align string
Right-align string
Center-align string
Limit string length to 9 characters

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How can you format a string to display two decimal places in Java?

%2f
%2d
%.2f
%.2d

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Explain the significance of \\s+ and \\s in Java.

Matches whitespace characters
Matches numeric characters
Matches special characters
Matches alphabetic characters

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does the asterisk '*' mean in Java string formatting?

Left-align
Right-align
Center-align
Replace with asterisk

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?