Documente Academic
Documente Profesional
Documente Cultură
1. Character class
2. String class
3. String Buffer class
EX:The class string provides many accessor methods that may be used to perform
operations on strings.
4. If the argument is a negative value then the result will be min value of int type.
6. Predefined classes are available in the form of packages. These are called the
Java class libraries.
EX;java.awt
java.lang
Java.util
import java.io.*;
The equalsIgnoreCase() compares the current string to the specified string ignoring
case considerations.
12. The string objects of Java are immutable i.e., once created, they cannot be
changed. If any change occurs in a string object, then original string remains
unchanged and a new string is created with the changed string.
13.import javax.swing.JOptionPane;
jOptionShowMessageDialog(null,”IP12CBSE”);
14.
15.i)jTextArea1=Go Green
India
ii)jTextField1=6
16.i)jTextArea1=Just Another
Day
ii) jTextField1=31
Text2=India
Str2=Hello
19.jTextFiled1=8
jTextField2=6
20.String strPassword=”67890”;
int intPassword=Integer.parseInt(strPassword);
System.out.println(intPassword);
21.X1=PEACESPREAD
Type B:
1. String Buffer objects provide more flexibility than String objects because
you can insert or append new contents into a String Buffer.
2. The methods which are in StringBuffer class but not in String class.
Are:
append(x) method
insert(offset,x) method
setCharAt(index,c) method
delete(beg,end) method
setLength(n) method
reverse()method
3.The math library of java is available under java.lang package i.e. its class
qualified name is java.lang.Math.
4.Math.round(1.5) 2
Math.round(-1.5) -1
6.TM=15
TN=80-15=65
jTextField2=15
jTextField3=65
7. welcome
WELCOME
welcome
wAlcomA
wABlcomAB
wABlcomAB