Search This Blog

Showing posts with label Java APIs. Show all posts
Showing posts with label Java APIs. Show all posts

Monday, November 3, 2025

Java Math API - 3

What is the output of the following code?

1. public class MathDemo2 {

2.     public static void main(String[] args) {

3.         System.out.println(Math.max(29,Math.min(93,Math.min(54,Math.max(47,45)))));

4.     }

5. }

6.  


Created by Nancy K.A.N.
@23:31 03-Nov-2025

Friday, September 12, 2025

Java Math API - 2

 What will be the output of compiling and executing the following code?







a) -4

b) 4

c) 4.563

d) Compile-time error: Invalid argument type


Created by Nancy K.A.N.

@12:01 12-Sept-2025



Wednesday, September 10, 2025

Java IO - 3

 Which of the following interfaces does the InputStream class implement?

a) Serializable

b) SeekableByteChannel

c) Closeable

d) Flushable


Created by Nancy K.A.N.

@12:36 10-Sept-2025

Monday, September 8, 2025

Java Object duplication

 Which of the following methods can be used to create a copy of the object on which it is called?

a) copy

b) copyObject()

c) clone()

d) duplicate()

e)CloneCurrentObject()


Created by Nancy K.A.N.

@13:32 08-Sept-2025