Home / Board / ICSE / important Questions / Class 10 / Computer Application / Library classes
Table of Contents
Ans. (d) Object is created Explanation: Memory is allocated for class objects when objects are created.
Ans. (b) Unboxing
Explanation:
Unboxing is the reverse of Boxing , which means converting wrapper class objects to primitive data types.
Explanation:
The method toString() is used to convert a primitive datatype to String.
For example :
String s = Float.toString(10.25);
Explanation:
import java.io.*;
public class test
{
public static void main(String args[]) throws IOException
{
int n;
BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
System.out.println(“Enter A Number “);
n = Integer.parseInt(b.readLine());
System.out.println(“Log of number is “ + Math.log(n));
System.out.println(“Absolute value of number is “ + Math.abs(n));
System.out.println(“Square root is “ + Math.sqrt(n));
System.out.println(“Random Numbers are : “);
System.out.println(Math.random());
}
}
Explanation:
class Path{
String s, pth, fname, file, ext;
int i, j;
void display()
{
s = “C :\\ Users\\ admin\\ Pictures\\ flower.jpg”;
i = s.lastIndexOf(‘\\ ‘);
pth = s.substring(0, i + 1);
fname = s.substring(i + 1);
j = fname.indexOf(‘.’);
file = fname.substring(0, j);
ext = fname.substring(j + 1);
System.out.println(“Path : “ + pth);
System.out.println(“File name : “ + file);
System.out.println
(“Extension : “ + ext);
}
}
Download Mind Map of this chapter
Download NowWant to Practice Mock Tests of this chapter
Practice NowDownload Important Questions of this chapter
Download NowChapter No. | Chapter Name |
---|---|
Chapter 1 | Revision of Class IX Syllabus |
Chapter 2 | Class as a Basis of all Computation |
Chapter 3 | User - defined Methods |
Chapter 4 | Constructors |
Chapter 5 | Library classes |
Chapter 6 | Encapsulation |
Chapter 7 | Arrays |
Chapter 8 | String handling |
Chapter Wise Important Questions for ICSE Board Class 10 Computer Applications |
---|
Revision of Class IX Syllabus |
Class as a Basis of all Computation |
User - defined Methods |
Constructors |
Library classes |
Encapsulation |
Arrays |
String handling |
CBSE Important Questions Class 9
CBSE Important Questions Class 10
CBSE Important Questions Class 12
CBSE Practice Papers
CBSE Practice Papers
ICSE Important Questions Class 9
ICSE Important Questions Class 10
ICSE Practice Papers
ISC Important Questions Class 12
ISC Practice Papers
Contact Us