- Real-world objects contain state and behavior.
- A software object's state is stored in fields.
- A software object's behavior is exposed through methods.
- Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation.
- A blueprint for a software object is called a class.
- Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.
- A collection of methods with no implementation is called an interface.
- A namespace that organizes classes and interfaces by functionality is called a package.
- The term API stands for Application Programming Interface.
This site is related to basic java & j2ee FAQs and best viewed in Firefox & google chrome So click X to close this message and enjoy various liferay solutions!!!
Friday, May 18, 2012
Some basics about java
Labels:
java fundamentals,
oop
Reverse string in java
Simplest Example of making reverse string using java
public class StringReverse
{
public static void main(String[] args)
{
String string=args[0];
String reverse = new StringBuffer(string).
reverse().toString();
System.out.println("\nString before reverse:
"+string);
System.out.println("String after reverse:
"+reverse);
}
}
Subscribe to:
Posts (Atom)