What Is Java?Basic Syntax
What Is Java?Basic Syntax
What Is Java?Basic Syntax
******************
Simple
Object-Oriented
Portable
Platform independent
Secured
Robust
Architecture neutral
Interpreted
High Performance
Multithreaded
Distributed
Dynamic
Comments can be used to explain Java code, and to make it more readable. It can also be
used to prevent execution when testing alternative code.
Single-line comments start with two forward slashes (//).
Any text between // and the end of the line is ignored by Java (will not be executed).
Arithmetic
---------------********************-----------------Programs------------
******************
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
5. Write a Java Program to reverse a string without using String inbuilt function
reverse().
public class FinalReverseWithoutUsingInbuiltFunction
{
public static void main(String[] args)
{
String str = "Saket Saurav";
char chars[] = str.toCharArray(); // converted to character array and
printed in reverse order
for(int i= chars.length-1; i>=0; i--)
{
System.out.print(chars[i]);
}
}
}