Java Articles

Page 446 of 450

What is the difference between a String object and a StringBuffer object in java?

Rishi Raj
Rishi Raj
Updated on 30-Jul-2019 467 Views

String class is immutable once you create an object of string you can modify its data.The StringBuffer class is immutable, once you create a StringBuffer object you can change/modify the contents of it.This class provides various methods to manipulate its data such as append(), delete(), insert() etc.

Read More

What are the different build tools in Java?

Ankitha Reddy
Ankitha Reddy
Updated on 30-Jul-2019 266 Views

"On a mean, a developer spends a considerable quantity of your time doing mundane tasks compiling the code, packaging the binaries, deploying the binaries to the checkserver, testing the changes," copying the code from one location to another. To automate and simplify these tasks we can use build tools like Ant, Maven, Gradle etc.

Read More

Is it necessary that a try block should be followed by a catch block in Java?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 725 Views

Not necessarily catch, a try must be followed by either catch or finally block. Example import java.io.File; public class Test{ public static void main(String args[]){ System.out.println("Hello"); try{ File file = new File("data"); } } } Output C:\Sample>Javac Test.java Test.java:5: error: 'try' without 'catch', 'finally' or resource declarations try{ ^ 1 error

Read More

What is the Eclipse keyboard shortcut for "System.out.println()" in Java?

Govinda Sai
Govinda Sai
Updated on 30-Jul-2019 15K+ Views

To get System.out.println() line in eclipse without typing the whole line type sysout and press Ctrl + space.

Read More

When a thread is created and started, what is its initial state?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 593 Views

When a new thread begins its life cycle in the new state. It remains in this state until the program starts the thread. It is also referred to as a born thread.After this newly born thread is started, the thread becomes runnable. A thread in this state is considered to be executing its task.

Read More

Way to check if SAP system is ABAP based, Java or Dual stack

Rahul Sharma
Rahul Sharma
Updated on 30-Jul-2019 2K+ Views

Using SAP GUI, you can only access ABAP or ABAP+Java based system. You can check at multiple places if it is a dual system.T-code: SMICM, you can checklist of services in transaction SMICM (Goto --> Services) - dual stack systems will have the J2EE services listed too. There will also be an AS Java menu in SMICM on ABAP+Java systems.

Read More

Difference between Java SE, Java EE, and Java ME?

mkotla
mkotla
Updated on 30-Jul-2019 2K+ Views

Java provides three editions JSE, JEE, JME. JSE − Java Standard Edition using this, you can develop stand-alone applications. This provides the following packages − java.lang − This package provides the language basics. java.util − This package provides classes and interfaces (API’s) related to collection framework, events, data structure and other utility classes such as date. java.io − This package provides classes and interfaces for file operations, and other input and output operations. java.math − This package provides classes and interfaces for multiprecision arithmetics. java.nio − This package provides classes and interfaces the Non-blocking I/O framework for Java java.net ...

Read More

What is meant by Java being ‘write once run anywhere’ language?

seetha
seetha
Updated on 30-Jul-2019 449 Views

Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on. Thus when you write a piece of Java code in a particular platform and generated an executable code .class file. You can execute/run this class file on any system the only condition is that the target system should have JVM (JRE) installed in it. In Short, If you have a ...

Read More

What is a JAR file?

varun
varun
Updated on 30-Jul-2019 3K+ Views

A java archive file is a file format/ archiving tool which contains all the components of an executable Java application. All the predefined libraries are available in this format. To include any of these (other than rt.jar) in to your project you need to set the class path for this particular JAR file. You can create a JAR file using the command line options or using any IDE’s. Creating a Jar file You can create a Jar file using the jar command as shown below. jar cf jar-file input-file(s) Let us consider an example, create a Sample Java ...

Read More

What is the difference between javac, java commands?

Sreemaha
Sreemaha
Updated on 30-Jul-2019 8K+ Views

The javac command is used to compile Java programs, it takes .java file as input and produces bytecode. Following is the syntax of this command. >javac sample.java The java command is used to execute the bytecode of java. It takes byte code as input and runs it and produces the output. Following is the syntax of this command. >java sample Let us consider an example create a Sample Java program with name Sample.java Sample.java public class Sample { public static void main(String args[]) { System.out.println("Hi welcome ...

Read More
Showing 4451–4460 of 4,495 articles
« Prev 1 444 445 446 447 448 450 Next »
Advertisements