Capsule Flashcards
1
Q
static Keyword ?
A
..
2
Q
final Keyword ?
A
..
3
Q
types of package?
A
2 :- User defined & In-built packages
4
Q
How to find size of char[] ?
A
//char ch[]={'a','b'}; ch.length; //o/p=2
5
Q
How to find size of String ?
A
//String str="hello"; str.length(); //o/p=5
6
Q
How to find size of array(any) ?
A
//array arr[]={'1', '2, '3'}; arr.length; //o/p=3
7
Q
How to use a package in another java program?
A
step 1: package packagename;
step 2: import packagename;
8
Q
Keyword used in Inheritance ?
A
extends