Professional Documents
Culture Documents
UNIT IV
Syllabus
Introduction to JAVA, byte code, virtual machines – objects – classes – Java doc
– Packages – Arrays – Strings.
PART - A
1. What is meant by Java?
Object Oriented Multithreaded High Level Programming Language
developed by sun Microsystems in 1991.
2. What is meant by Platform?
Platform is the hardware or system software environment in which your
program runs. Most platforms are described as a combination of hardware and
operating system.
3. Java is platform independent language. Justify.
Platform is the hardware or system software environment in which your
program runs. Moreover java language run by any operating system, thats why
java is called platform independent languages.
4. What is meant by Java Application?
An Application is a program that runs on your computer, under the
operating system of that system
5. What is meant by Java Applet?
An Applet is an application designed to be transmitted over the internet
and executed by a Java-Compatible web browser.
6. Define JDK.
JDK(Java Development Kit). JDK is a software package from Sun
Microsystems. Latest version of JDK is 1.5. This software package contains
tools.
7. What are the JDK Tools
Javac- Java Compiler
Java –Java interpreter
Jdb – Java Debugger
Javap- Java Disassembler
Javadoc- Java Documentation
o Package
20. Define method overloading.
Java enables 2 or more methods with same name but with different
signatures. The signature includes the number of type, and sequence of the
arguments passed to a method. The capability to overload a method is referred
to as overloading methods.
22. What is a class?
Collection of objects.
A class is a blueprint, or prototype, that defines the variables and the
methods common to all objects of a certain kind.
23. What is an object?
An object is a software bundle of variables and related methods.
An instance of a class depicting the state and behavior at that particular
time in real world.
24. What is a method?
Encapsulation of a functionality which can be called to perform specific
tasks.
25. What is encapsulation? Explain with an example.
Encapsulation is the term given to the process of hiding the
implementation details of the object. Once an object is encapsulated, its
implementation details are not immediately accessible any more. Instead they
are packaged and are only indirectly accessible via the interface of the object.
26. What is inheritance? Explain with an example.
Inheritance in object oriented programming means that a class of objects
can inherit properties and methods from another class of objects.
27. What are the different types of modifiers?
There are access modifiers and there are other identifiers. Access
modifiers are public, protected and private. Other is final and static.
m.in));
System.out.println("Please enter first string:");
String str1 = bf.readLine();
System.out.println("Please enter second string:");
String str2 = bf.readLine();
if (str1.equals(str2)){
System.out.println("The given string is equals");
}
else{
System.out.println("The given string is not equals");
}
}}
46. How can u replace a single character in a String?
To replace a character with the given character in sting first convert the
string into char array. Use getChars(int scrStart, int scrEnd, char[] destChar,
int destStart) method for converting a string into an array of characters. Then
use while loop for comparing the "oldChar" ( character name for replace) to be
change with the new character of the array. If any match find then replace the
"oldChar" with newChar (character name to replace) and set flag =1. To convert
charArray into string, pass "charArray" into String class. getChars(int
scrStart, int scrEnd, char[] destChar, int destStart): This method returns an
array of characters from a string. We are passing four parameter into this
method. First parameter scrStart is the starting point while second parameter
scrEnd is the end point of the source string to convert the string into a char
array. The destChar is the destined array which stores all the characters. The
destStart is starting index to store the characters.
47. Write a java program for find out string length.
import java.lang.*;
import java.io.*;
public class StringLength{
public static void main(String[] args) throws IOException{
System.out.println("String lenght example!");
}
C:\convert\rajesh\completed>javac ArgumentPassingExample.java
C:\convert\rajesh\completed>java ArgumentPassingExample rajesh
kumar rahul
The values enter at argument command line are:
Argument 1 = rajesh
Argument 2 = kumar
Argument 3 = rahul
49. What is String Buffer in Java?
The StringBuffer class is used to represent characters that can be
modified. This is simply used for concatenation or manipulation of the strings.
StringBuffer is mainly used for the dynamic string concatenation which
enhances the performance. A string buffer implements a mutable sequence of
characters. A string buffer is like a String, but can be modified. At any point in
time it contains some particular sequence of characters, but the length and
content of the sequence can be changed through certain method calls.
50. Write any 4 methods available in String Buffer Class.
substring()
This is the substring() function which is used to get the sub string from
the buffered string from the initial position to end position (these are fixed by
you in the program).
deleteCharAt()
This is the deleteCharAt() function which is used to delete the specific
character from the buffered string by mentioning that's position in the string.
length()
This is the length() function is used to finding the length of the buffered
string.
delete()
This is the delete() function is used to delete multiple character at once
from n position to m position (n and m are will be fixed by you.) in the buffered
string.
51. What is Package?
defines how to create a unique package name, so that packages that are widely
used with unique namespaces. This allows packages to be easily managed. In
general, we starts a package name begins with the order from top to bottom
level. Package names should be in lowercase characters whenever possible.
55. What is Java – Doc Commends?
Commenting in Java can take two forms, typical comments that can be
found in numerous other programming languages like C/C++; namely single
line comments and multiline comments. Then there are Java doc comments
that are unique to the Java language. In this section we will discuss why
commenting is needed and look at how to provide the standard single line and
multi-line comments in Java.
56. What is the need for comments in java?
Some of the reasons for using comments are:
Often comments are added at the start of each source file to give a
description of what source the file contains and copyright information.
The fields and methods of a class are often given brief comments that
describe their purpose and what they do.
Complex code is often commented heavily to make it clearer and easier to
understand.
57. What are all the types of comments available in java?
Single Line Comments
Single line comments are used to add a very brief comment within some
code, often a long or complex method. They begin with a double forward slash
(//) and end with the end of line or carriage return. As an example consider:
private static String name = "Guys"; //The name to print
byte 0
short 0
int 0
long 0L
float 0.0f
double 0.0d
char '\u0000'
boolean false
also helps in making Java Robust. Bugs, especially system crashing bugs, are
very rare in Java.
PART - B
1. Discuss about JAVA HISTORY.
JAVA HISTORY
Java is a general-purpose, object-oriented programming language
developed by Sun Microsystems of USA in 1991.
Originally called Oak by James Gosling (one of the inventor of the
language).
Java was invented for the development of software for consumer
electronic devices like TVs, tosters, etc.
The main aim had to make java simple, portable and reliable.
Java Authors: James , Arthur Van , and others
There are no header files in Java. We have to use header file in C++.
The virtual machine code is not machine specific. The machine specific code
(known as machine code) is generated by the Java interpreter by acting as
an intermediary between the virtual machine and the real machine.
Real Machine
Operating System
Java Virtual Machine
Java Object Framework (API)
Compiler Interpreter
User Application Programs
User
Java class objects exhibit the properties and behaviors defined by its class.
A class can contain fields and methods to describe the behavior of an object.
Methods are nothing but members of a class that provide a service for an
object or perform some business logic.
Java fields and member functions names are case sensitive.
Current states of a class’s corresponding object are stored in the object’s
instance variables.
Methods define the operations that can be performed in java programming.
class name1
{
//public variable declaration
void methodname()
{
//body of method…
//Anything
}
}
In program,
Demo object=new Demo();
object.input();
object.sum();
object.print_data();
In the first line we created an object.
The three methods are called by using the dot operator. When we call a
method the code inside its block is executed. The dot operator is used to call
methods or access them.
Instance Variable
All variables are also known as instance variable. This is because of the
fact that each instance or object has its own copy of values for the variables.
Hence other use of the “dot” operator is to initialize the value of variable for
that instance.
n=x; sum=obj.process();
n=y; System.out.println("The sum is"+sum);
} }}
public int process() Output:
{ The sum is 25
return (n+n2); } }
Method Overloading
Method overloading means method name will be same but each method
should be different parameter list.
class prg1 class Demo
{ {
int x=5,y=5,z=0; public static void main(String args[])
public void sum() {
{ prg1 obj=new prg1();
z=x+y; obj.sum();
System.out.println("Sum is "+z); obj.sum(10,12);
} System.out.println(+obj.sum(15));
public void sum(int a,int b) }
{ }
x=a; Output:
y=b; sum is 10
z=x+y; sum is 22
System.out.println("Sum is "+z); 27
}
public int sum(int a)
{
x=a;
z=x+y;
return z;
}}
Pass by Reference
Objects are always passed by reference. When we pass a value by reference,
the reference or the memory address of the variables is passed. Thus any
changes made to the argument causes a change in the values which we
pass.
Abstract classes are those which can be used for creation of objects.
However their methods and constructors can be used by the child or
extended class. The need for abstract classes is that you can generalize the
super class from which child classes can share its methods. The subclass of
an abstract class which can create an object is called as "concrete class".
When the keyword abstract appears in a class definition, it means that zero
or more of it’s methods are abstract.
Abstract classes basically provide a guideline for the properties and methods
of an object.
There are situations in which you want to define a superclass that declares
the structure of a given abstraction without providing a complete
implementation of every method.
That is, sometimes you want to create a superclass that only defines
generalized form that will be shared by all of its subclasses, leaving it to
each subclass to fill in the details.
One way this situation can occur is when a superclass is unable to create a
meaningful implementation for a method.
SYNTAX:
Note:
If a class defines an explicit constructor, it no longer has a default
constructor to set the state of the objects.
If such a class requires a default constructor, its implementation must be
provided. Any attempt to call the default constructor will be a compile time
error if an explicit default constructor is not provided in such a case.
Overloaded Constructors
The constructors in a class all have the same name as the class, their
signatures are differentiated by their parameter lists.
It is possible to use this() construct, to implement local chaining of
constructors in a class.
Java requires that any this() call must occur as the first statement in a
constructor.
public class Cube2 { Cube2(int l, int b, int h) {
int length; length = l;
int breadth; breadth = b;
int height; height = h;
public int getVolume() { System.out.println("Finished with
return (length * breadth Parameterized Constructor having 3
* height); params"); }
} public static void main(String[] args) {
Cube2() { Cube2 cubeObj1, cubeObj2;
this(10, 10); cubeObj1 = new Cube2();
cubeObj2 = new Cube2(10, 20,
System.out.println("Finished 30);
with Default Constructor"); System.out.println("Volume of Cube1 is :
} " + cubeObj1.getVolume());
Cube2(int l, int b) {
this(l, b, 10); System.out.println("Volume of
Cube2 is : " + cubeObj2.getVolume());
System.out.println("Finished }
ARRAY:
Definition: Array is the static memory allocation. It allocates the memory for
the same data type in sequence. It contains multiple values of same types. It
also stores the values in memory at the fixed size. Multiple types of arrays are
used in any programming language such as: one - dimensional, two -
dimensional or can say multi - dimensional.
Declaration :
Sometimes user declares an array and its size simultaneously. You may or
may not be define the size in the declaration time.
In This program illustrates that the array working way. This program takes
the numbers present in the num[] array in unordered list and prints
numbers in ascending order.
In this program the sort() function of the java.util.*; package is using to sort
all the numbers present in the num[] array. The Arrays.sort() automatically
sorts the list of number in ascending order by default. This function held the
argument which is the array name num.
import java.util.*;
public class array{ Output:
public static void main(String[] args){ C:\chandan>javac
int num[] = {50,20,45,82,25,63}; array.java
int l = num.length; C:\chandan>java
int i,j,t; array
System.out.print("Given number : "); Given number : 50
for (i = 0;i < l;i++ ){ 20 45 82 25 63
System.out.print(" " + num[i]); Ascending order
} number : 20 25 45
System.out.println("\n"); 50 63 82
System.out.print("Accending order number : ");
Arrays.sort(num);
for(i = 0;i < l;i++){
System.out.print(" " + num[i]);
} } }
Firstly we have to define a class "CopyArray". Now, we take two integer type
arrays like: array1 [] and array2 []. The array1[] contains some integer type
values (2,3,4,5,8,9) and another is blank. After initializing this, now we get
number of rows and columns by using the array1.length. We use the 'for'
loop statement for displaying and copying ( array1[j] = array2[j] ) the array.
}} santosh
deepak
Declaration:
For displaying the matrix we need to its rows and column by using the
array.length method.
Use the for loop to print all the values stored in the array. At last use the
main() method inside which we are going to declare the values of the
multidimensional array which we are going to use. Call the outputArray()
method inside the main method. The output will be displayed to the user by
println() method.
System.out.println();
456
}
int m= array1.length;
689
System.out.print(" "+array1[i][j]);
Matrix 2 :
}
System.out.println();
546
}
System.out.println("Addition of both matrix : ");
567
for(int i = 0; i < m; i++) {
for(int j = 0; j <= m; j++) {
Addition of both matrix
System.out.print(" "+(array[i][j]+array1[i][j]));
:
}
System.out.println();
9 9 12
}
}} 11 14 16
13. Explain String operations in Java with Example. (Nov/Dec 2012) (May/Jun
2013)
STRINGS:
Definition: Strings, which are widely used in Java programming, are a
sequence of characters. In the Java programming language, strings are objects.
The Java platform provides the String class to create and manipulate strings.
Creating Strings:
String greeting = "Hello world!";
The different string operations are
int compareTo(Object o)
2
Compares this String to another Object.
byte getBytes()
6 Encodes this String into a sequence of bytes using the platform's default
charset, storing the result into a new byte array.
int hashCode()
9
Returns a hash code for this string.
int length()
11
Returns the length of this string.
char[] toCharArray()
20
Converts this string to a new character array.
String toLowerCase()
21 Converts all of the characters in this String to lower case using the rules of
the default locale.
String toString()
22
This object (which is already a string!) is itself returned.
String toUpperCase()
23 Converts all of the characters in this String to upper case using the rules of
the default locale.
String trim()
24
Returns a copy of the string, with leading and trailing whitespace omitted.
// convert string into Lower case // Find the character at the given index
from the given string
String Lowercase = str.toLowerCase();
System.out.println(“Character at the
System.out.println(“Lower case String ==>
index 6 is ==> ” + str.charAt(6));
” + Lowercase);
System.out.println(“String after
replacement ==> ”
+ str.replace(“java”, “loan”)); }}
Example:
public class JavaStringBufferExample { /*
2. StringBuffer StringBuffer(int
public static void main(String[] args) { length)
/* Constructs empty StringBuffer with
Java StringBuffer is a mutable initial capacity of length
sequence of characters. */
Difference between Java String and StringBuffer sbObj2 = new
StringBuffer is that StringBuffer StringBuffer(10);
can be modified while String can
not. /*
3. StringBuffer StringBuffer(String
Java StringBuffer can buit using str)
one of the following constructors constructs StringBuffer with the
*/ contents same as argument String
*/
/* StringBuffer sbObj3 = new
1. StringBuffer StringBuffer() StringBuffer("Hello World");
Construct empty StringBuffer with System.out.println(sbObj3);
initial capacity of 16
*/ }
}
StringBuffer sbObj1 = new
StringBuffer();
Static Variables
Fields that have the static modifier in their declaration are called static
fields or class variables. They are associated with the class, rather than with
any object. Every instance of the class shares a class variable, which is in one
fixed location in memory. Any object can change the value of a class variable,
but class variables can also be manipulated without creating an instance of the
class.
Static Methods
The Java programming language supports static methods as well as
static variables. Static methods, which have the static modifier in their
declarations, should be invoked with the class name, without the need for
creating an instance of the class, as in
ClassName.methodName(args)
Example
class Cube { public class CubeStaticTest {
public static void main(String args[]) {
int length = 10; System.out.println("Number of Cube
int breadth = 10; objects = " + Cube.numOfCubes);
int height = 10; System.out.println("Number of Cube
public static int numOfCubes = 0; objects = "+ Cube.getNoOfCubes());
// static variable }
public static int getNoOfCubes() { }
//static method Output:
return numOfCubes; Number of Cube objects = 0
} Number of Cube objects = 0
public Cube() {
numOfCubes++; //
}
}
Definition 1:
Creating a package
Creating a package in java is quite easy. Simply include a package command
followed by name of the package as the first statement in java source file.
Example:
package mypack;
public class employee
{
...statement;
}
The above statements create a package called mypack.
Java uses file system directory to store package. For example the .class for
any classes you to define to be part of mypack package must be stored in a
directory called mypack
Example
import static java.lang.Math.sqrt; //importing static method sqrt
of Math class
Example
import static java.lang.Math.*; //importing all static member of
Math class
12
o Interfaces
o Classes
o Enumerated types
o Annotations
Public
Public classes, methods, and fields can be accessed from everywhere.
Example:
public class Square { // public class
public int x, y, size; // public instance variables
}
Private
Private methods and fields can only be accessed within the same class to
which the methods and fields belong.
Private methods and fields are not visible within subclasses and are not
inherited by subclasses.
So, the private access specifier is opposite to the public access specifier.
It is mostly used for encapsulation: data are hidden within the class and
accessor methods are provided.
Example:
public class Square { // public class
private double x, y // private (encapsulated) instance variables
Default
If you do not set access to specific level, then such a class, method, or field
will be accessible from inside the same package to which the class, method,
or field belongs, but not from outside this package.
This access-level is convenient if you are creating packages.
Access Level Permitted By Each Specifier:
Accessible to class
yes yes yes no
from same package?
Accessible to class
yes no, unless it is a subclass no no
from different package?
The comment begins with “/**” and ends (as do all comment blocks) with
“*/”. We associate these blocks with specific parts of our .java file by
placing the special comment block directly before that part of the code.
The fields and methods of a class are often given brief comments that
describe their purpose and what they do.
Comments in Java
Single Line Comments
private static String name = "Guys"; //The name to print
17. Create a Complex number class in Java. The class should have a
constructor and methods to add, subtract and multiply two complex nos,
and to return the real and imaginary parts.
public class Complex { public Complex mul(Complex op) {
public Complex () { Complex result = new Complex();
this.re = 0; result.setRe(this.re * op.getRe() - this.im *
this.im = 0; op.getIm());
} result.setIm(this.re * op.getIm() + this.im *
public Complex(double re, double im) { op.getRe());
this.re = re; return result;
this.im = im; }
}
public Complex(Complex input) { public Complex div(Complex op) {
this.re = input.getRe(); Complex result = new Complex(this);
this.im = input.getIm(); result = result.mul(op.getConjugate());
} double opNormSq =
public double getRe() { op.getRe()*op.getRe()+op.getIm()*op.getIm();
return this.re; result.setRe(result.getRe() / opNormSq);
} result.setIm(result.getIm() / opNormSq);
public double getIm() { return result;
return this.im; }
} public Complex getConjugate()
public void setRe(double re) { {
this.re = re; return new Complex(this.re, this.im * (-1));
} }
public void setIm(double im) { public String toString() {
this.im = im; if (this.re == 0) {
} if (this.im == 0) {
public Complex add(Complex op) { return "0";
Complex result = new Complex(); } else {
result.setRe(this.re + op.getRe()); return (this.im + "i");
result.setIm(this.im + op.getIm()); }
return result; } else {
} if (this.im == 0) {
public Complex sub(Complex op) { return String.valueOf(this.re);
Complex result = new Complex(); } else if (this.im < 0) {
result.setRe(this.re - op.getRe()); return(this.re + " " + this.im + "i");
result.setIm(this.im - op.getIm()); } else {
return result; return(this.re + " +" + this.im + "i");
} }
public Complex mul(Complex op) { }
Complex result = new Complex(); }
result.setRe(this.re * op.getRe() - private double re;
this.im * op.getIm()); private double im;
result.setIm(this.re * op.getIm() + public static void main(String argv[]) {
this.im * op.getRe()); Complex a = new Complex(3, 4);
return result; Complex b = new Complex(1, -100);
} System.out.println(a.add(b));
System.out.println(a.sub(b));
System.out.println(a.mul(b));
System.out.println(a.div(b));
}
}
18. Write a menu-based java program that can calculate the area of a
triangle, circle or square, based on the user‟s choice.
package rand; switch(sn)
import java.io.*; {
public class chpackage case 1:
{ {
public String read()throws double r,area;
IOException { c.put("Enter the radius");
BufferedReader r=Double.parseDouble(c.read());
br=new BufferedReader(new area=3.14*r*r;
InputStreamReader(System.in)); c.put("The area of circle"+area);
String str=br.readLine(); break;
return str; }
} Case 2:
{{{
public void paste(String st) double b,h,area;
{ c.put("Enter the breath");
System.out.print(st); b=Double.parseDouble(c.read());
} c.put("Enter the height");
public void put(String pu) h=Double.parseDouble(c.read());
{ area=0.5*b*h;
System.out.println(pu); c.put("The area of circle"+area);
} break;
} case 3: {
The below code is outside of the double r,h,area;
folder. c.put("Enter the radius");
import rand.*; r=Double.parseDouble(c.read());
import java.io.*; c.put("Enter the height");
class pk4 { h=Double.parseDouble(c.read());
public static void main(String area=3.14*r*r*h;
ar[])throws IOException c.put("The area of cylinder"+area);
{ break; }
chpackage c=new chpackage();
c.put("AREA OF VARIOUS case 4: {
GEOMETRICAL FIGURES"); int si,area;
{ c.put("Enter the side");
c.put("MAIN MENU"); si=Integer.parseInt(c.read());
c.put("1.Area of circle"); area=si*4;
c.put("2.Area of triangle"); c.put("The area of square"+area);
c.put("3.Area of cylinder"); break;
c.put("4.Area of square"); }
c.put("5.Exit"); case 5:
c.put("Enter your choice"); {
int sn=Integer.parseInt(c.read()); }
} }}
University Questions
PART – A
1. What is an abstract class? (Nov/Dec 2011)
Refer Q.No:58
2. Under which context would you use „final‟ and „finally‟. (Nov/Dec 2011)
Refer Q.No:36
3. Give two examples for java modifiers. (Nov/Dec 2010)
Refer Q.No:27 & 28
4. What is the purpose of the getBytes( ) method? (Nov/Dec 2010)
Refer Q.No: 59
5. List all data types in java. (Nov/Dec 2008)
Refer Q.No: 60
6. Define classes and methods in Java. (Nov/Dec 2008)
Refer Q.No:22 & 24
7. What is byte code? (May/Jun 2012) (Nov/Dec 2013)
Refer Q.No: 13
8. What are packages? (May/Jun 2012)
Refer Q.No: 51
9. Why is java language called as „robust‟? (Nov/Dec 2013)
Refer Q.No:61
10. How does java make an executable file? (Nov/Dec 2013)
Refer-Q-no: Part b 5
11. Is JVM„s platform independent? Justify. (May/Jun 2013)
Refer Q.No: 15
12. How do we allocate an array dynamically in Java? (May/Jun 2013)
Refer Q.No: 41
13. How is the keyword „super‟ used in Java? (Nov/ Dec 2011)
Refer-Q-no: 18
14. What are wrapper classes in Java? (Nov/ Dec 2011)
Refer-Q-no: 29
15. Give a sample statement for parseInt( ) and give comments for the
statement. (Nov/ Dec 2010)
Refer-Q-no: part b – 7
16. What is the difference between an interface and abstract class?
(Nov/Dec 2012)
Refer-Q-no: 37
PART – B
1. Describe the structure of a typical Java program and give the steps to
execute it. (10) (Nov/Dec 2011)
Refer Q.No: 5
2. Explain the importance of JVM in JRE. (6) (or) Explain the virtual
machine concept with reference to Java.(Nov/Dec 2010) (Nov/Dec 2011)
Refer Q.No: 4
3. Create a Complex number class in Java. The class should have a
constructor and methods to add, subtract and multiply two complex nos,
and to return the real and imaginary parts. (10) (Nov/Dec 2011)
Refer Q.No: 17
4. What are packages? How we they created and used? (Nov/Dec 2011)
Refer Q.No: 14
5. Write a menu-based java program that can calculate the area of a
triangle, circle or square, based on the user‟s choice. (Nov/Dec 2010)
Refer Q.No: 18
6. Explain the Virtual Machine concept with reference to Java.
(Nov/Dec 2010)
Refer Q.No: 3
7. Explain constants, variables and operators in Java. Write a simple java
program to concatenate two strings. (Nov/Dec 2008)
Refer Q.No: 13
8. Explain array declaration, initialization and use in Java. Write a java
program to implement matrix multiplication. (Nov/Dec 2008)
Refer Q.No: 12
9. Write a java program to perform all string operations using String class.
(May/Jun 2012)
Refer Q.No: 13
10. Write a java program to create two single dimensional array, initialize
them and add them store the result in another array. (May/Jun 2012)
Refer Q.No: 11
11. Explain about various string operation in Java. (Nov/Dec 2012)
Refer Q.No: 13
12. Write a program to find the maximum number of the given array.
(Nov/Dec 2012)
Refer Q.No: 11
13. Explain abut packages in Java. (Nov/Dec 2012)
Refer Q.No: 14
14. Write a program to convert an Integer array to String. (Nov/Dec 2012)
Refer Q.No: 11 & 13
15. Write a Java program using arrays to do the following (May/Jun 2013)
(i) to copy one array content to another array
(ii) to arrange the numbers in ascending order
(iii) find the maximum of an array
Refer Q.No: 11
16. Write a simple java program to find a given string in a string array.
(May/Jun 2013) (or) How one dimensional arrays are handled in Java?
Explain it with an example. (April/May 2011)
Refer Q.No: 11
17. Write a Java program to split a string into multiple Java String
Objects. (May/Jun 2013)
Refer Q.No: 13
18. i) Explain about Java features. (Nov/Dec 2013)