Java FAQ’s
Java Online Training in Ameerpet Hyderabad
We are providing Java Online Training in Ameerpet Hyderabad. We are one of best Institute to provide Best High Quality Java online training all over India. The IT Professionals and Students from India and abroad who are unable to attend regular classes can attend our Java online training from their home in their convenient timings. For more details on Java Online Training and Java FAQ’s please call to 9290971883, / 9247461324, or drop a mail to revanthonlinetraining@gmail.com
Java FAQ’s
2. What is the main differences between the Java platform and other platforms?
There differences between the Java platform and other platforms are :
Java is the software-based platform whereas the other platforms may be the software based platforms or hardware platforms.
Java is executed on the top of other hardware platforms whereas the other platforms can only have the hardware components.
3. Why Java is platform independent?
Java is known as platform independent as of its byte codes can run on any system irrespective of its underlying operating system.
4. Explain a Java Class.
A class in Java programming language is a blueprint which includes all the data. A class contains fields or variables and methods to describe the behavior of an object. The syntax of a class will be
class Abc {
member variables // class body
methods}
5. Why Java is not 100% Object-oriented?
Java is not 100% Object-oriented programming language because it makes the use of eight primitive data types such as boolean, byte, char, int, float, double, long, short which are not objects.
6. Why do we say Java as it has 'write once and run anywhere' nature?
Java compiler converts the Java programs into the class file or Byte Code which is an intermediate language between source code and machine code. The bytecode is not platform specific and it can be executed on any computer.
7. What is the purpose of Static methods and static variables in Java?
We use static methods and static variables when there is a requirement to share a method or a variable between multiple objects of a class instead of creating separate copies for each object, we use static keyword to make a method or variable shared for all objects.
8. What is the difference between double and float variables in Java?
The float variables takes 4 bytes in memory while the Double variables takes 8 bytes in memory. Float is single precision floating point decimal number while Double is the double precision decimal number.
9. Can main() method in Java can return any data?
In java, the main() method can't return any data and hence, it is always declared with a void return type.
10. When serialization is used?
Serialization is used when the data needs to be transmitted over the network. By serialization, the object's state is saved and converted into byte stream. The byte stream is transferred over the network and the object is re-created at destination.
11. Can a class have multiple constructors in java?
A class can have multiple constructors with different parameters in Java. Which constructor is used for object creation depends on the arguments passed while creating the objects.
12. Why Runnable Interface is used in Java?
Runnable interface is used for implementing multi threaded applications in Java. Runnable interface is implemented by a class to support multi threading.
13. Is String a data type in java?
String is not a primitive data type in java programming language. When a string is created in java, it is an object of Java.Lang.String class that gets created. After creating of the string object, all the built-in methods of String class can be used on the string object.
14. What is multi-threading?
Multi threading is a programming concept which can be used to run multiple tasks in a concurrent manner within a single program. Threads share same process stack and running in parallel and helps in improvement of performance of any program.
15. What is a platform?
A platform is the hardware environment or a software environment in which a piece of software is executed. Generally there are two types of platforms, software-based and hardware-based. Java provides the software-based platform.
16. What is a classloader in Java?
A Java ClassLoader is a subset of Java Virtual Machine (JVM), which is responsible for loading the class files. Whenever a Java program is executed it is first loaded by the classloader. Java programming language provides three built-in classloaders:
- Bootstrap ClassLoader
- Extension ClassLoader
- System/Application ClassLoader
17. What is a Map in Java?
Map is an interface of Util package which maps unique keys to values. The Map interface is not a subset of the main Collection interface and thus it behaves little different from the other collection types. Below are a few of the characteristics of Map interface:
Map doesn’t contain duplicate keys.
Each key can map at max one value.
18. What all memory areas are allocated by JVM?
The memory areas allocated by JVM are Classloader, Class area, Heap, Stack, Program Counter Register and Native Method Stack
19. What is javac ?
The javac is a compiler which compiles the source code of the program and generates bytecode. In simple words javac produces the java byte code from the source code written *.java file. JVM executes the bytecode to run the program.
20. What is JDBC DatabaseMetaData interface?
The DatabaseMetaData interface returns the information of the database such as username, driver name, driver version, number of tables, number of views etc.
Java FAQ’s
Institute Address :
B1, 3rd Floor, Eureka Court, Near Image Hospital, Ameerpet, Hyderabad, India
Other Courses ;
Informatica MDM Online Training