AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
Java Programming
Which of these array declarations and initializations are legal?
int arr[4] = new int[4];
int[4] arr = new int[4];
int arr[] = new int[4][4];
int[] arr = new int[4];
Which of these statements is illegal.
int arr[][] = new int[5][5];
int []arr[] = new int[5][5];
int[][] arr = new int[5][5];
int[] arr = new int[5][];
Given a one dimensional array arr, what is the correct way of getting the number of elements in arr. Select the one correct answer
arr.length
arr.size
arr.length()
arr.length() - 1
Which of the following class is not included in java.lang?
Byte
Integer
Array
Class
Which of these is a process of converting a simple data type into a class?
type wrapping
type conversion
type casting
None of the above
Which of these is a super class of wrappers Double & Integer?
Long
digits
float
number
Which of these methods is used to check for infinitely large and small values?
isInfinite()
isNaN()
IsInfinite()
IsNaN()
What is the output of this program?
classisinfinite_output{ publicstaticvoidmain(String args[]){ Double d = new Double(1 / 0.); boolean x = d.isInfinite(); System.out.print(x); } }
0
1
True
False
classisNaN_output{ publicstaticvoidmain(String args[]){ Double d = new Double(1 / 0.); boolean x = d.isNaN(); System.out.print(x); } }
classbinary{ publicstaticvoidmain(String args[]){ int num = 17; System.out.print(Integer.toBinaryString(num)); } }
1001
10011
11011
10001
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies