Breaking News
Home / Java / Java FAQ (page 2)

Java FAQ

What is JDBC URL format for MySQL Connector/J?

Answer: The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional: jdbc:mysql://[host][,failoverhost…][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]… If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers. [pb_builder]

Read More »

What is Javac tool?

Javac tool is the program that is used to compile Java source code into complied classes.  The java source code is written in files with extension .java. In order to execute the program, these files need to be compiled in .class files. The javac executable comes with the JDK. It …

Read More »

What is Java tool?

Java tool is the program that launches the JVM. The java executable comes with the JDK and is also part of JRE. It can be launched from the command line with bunch of input parameters. The main class that needs to be run as the starting point is the required …

Read More »

What are the default values for primitive datatypes in Java?

The following table lists out default value of  the various primitive data types: Data Type         Default Value byte                           0 short                           0 int                               0 long                            0L float                          0.0f double                       0.0d char                        ‘u0000’ String (or any object)    null boolean                       false [pb_builder]

Read More »

What are the different primitive datatypes in Java?

The following are the various primitive data types and their ranges:    * byte: The byte data type is an 8-bit signed two’s complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive). The byte data type can be useful for saving memory in …

Read More »
Advertisment ad adsense adlogger