Learning java basics
Try the following queries in Google and learn Java from abc…
- how to run java in cmd? “java helloworld”
- how to compile java code in cmd? “javac helloworld.java”
- how to clear screen in cmd with java
public final static void clearCMDConsole()
{
try
{
final String os = System.getProperty("os.name");
if (os.contains("Windows"))
{
Runtime.getRuntime().exec("cls");
}
else
{
Runtime.getRuntime().exec("clear");
}
}
catch (final Exception e)
{
// Handle any exceptions.
}
}
- how to exit program in java
- how to read file in java on windows
- how to get input in java
- how to compare string in java
- how to search a string in java:
boolean exists = line.contains(search_str);
- how to append string in file java
- how to check empty string in java
- add element to array java
- overwrite text file in java
- compare two strings in java
Download Sample File
Last updated: November 19, 2014