List some of the primitive datatypes used in java


Problem

1) What are java keywords? List some of them?

2) After compilation of the program what kind of file does the compiler generate?

3) A java statement to read user input from console.

4) List some of the primitive datatypes used in java.

5) What is a constant variable? How do you declare it?

6) What is the difference between pre increment and post increment operators

7) How do you convert a double to an int?

8) What happens if there is no "break" in switch statement cases?

9) What is an infinite loop?

10) How do you generate a random number?

11) What is the formula to generate random number that lies between two numbers?

12) How can you compare two strings?

13) Is string class immutable?

14) How to convert a string to an integer?

15) Can you assign a string to another string like this, s1 = s2? is it valid?

16) What is the difference between while and do while?

17) What is method overloading?

18) Can you overload a method multiple times?

19) Are arrays primitive types? What kind of datatypes can they store?

20) Can you change the size of a single dimensional array?

21) What are constructors?

22) Do constructors have a return type?

23) Does java provide you with a default constructor every time?

24) What does a default constructor look like?

25) What are the cases when java doesn't give you a default constructor?

26) What keyword is used to create an object?

27) List two uses of this keyword.

28) What are references types? How are they different from primitive type?

29) How are static variables and methods different from other variables and methods?

30) What is data hiding? Why do we use it?

31) What are wrapper classes?

32) Does arrayList store primitive types or reference types or both?

33) Conversion between primitive types and wrapper class types?

34) How is stringBuilder and stringBuffer different from string class?

35) Does java allow multiple inheritance?

36) List two uses of super keyword.

37) What is the difference between overriding and overloading?

38) What is checked exception? What is unchecked exception?

39) When does finally clause get executed?

40) What class to use when manipulating text files?

41) What class to use when writing on text files?

42) What class to use when reading from a text file?

43) What is the difference between abstract class and interface?

44) Can an interface have a sub interface?

45) Can you create an object of abstract class?

46) If your class implements Comparable, which method will it implement?

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: List some of the primitive datatypes used in java
Reference No:- TGS03284819

Expected delivery within 24 Hours