Online Notes
Java

Recent Java Snippets

  • Read Input from User
  • Get jsp response as a string inside servlet
  • Find Upper Case & Lower Case
  • Sorting HashMap by values in ascending and descending order

Recent Java Examples

  • How to reverse Singly Linked List?
  • Find out duplicate number between 1 to N numbers.
  • Find out middle index where sum of both ends are equal
  • Write a singleton class in Java
  • Write a java program to reverse a string?
  • Write a java program to remove all white spaces from a string.?
  • Singly linked list implementation
  • Doubly linked list implementation

Recent Java Questions

  • Explain Platform?
  • What is Multi-threading in Java?
  • What is ‘IS-A’ relationship in java?
  • Explain Java Coding Standards for Constants?
  • Explain Java Coding Standards for variables ?
  • Explain Java Coding standards for Methods?
  • Explain Java Coding standards for interfaces?
  • Explain Java Coding Standards for classes or Java coding conventions for classes?
  • Difference between ‘>>’ and ‘>>>’ operators in java?
  • What are constants and how to create constants in java?

What are constants and how to create constants in java?

Constants are fixed values whose values cannot be changed during the execution of program. We create constants in java using final keyword.

Example :

final int number = 10;
final String str=”java-constants”;

Related posts

  • Why java is platform independent?
  • Diamond Problem ?
  • Define public, static, final ?
  • Explain Platform?
  • What is ‘IS-A’ relationship in java?
  • Explain about main() method in java ?
  • Why are interface variables static and final by default?
  • Explain Java Coding standards for Methods?
  • What are Object Oriented Programming (OOPs) Concept ?
  • What is encapsulation in Java?

Recent Snippets

  • How to Install Angular on Ubuntu (18.04 & 16.04)
  • Install Node.js in Ubuntu
  • Angular CLI & Troubleshooting
  • Simple POJO Example - Employee
  • Hibernate Example Configuration File — hibernate.cfg.xml

Recent Examples

  • How to reverse Singly Linked List?
  • Find out duplicate number between 1 to N numbers.
  • Find out middle index where sum of both ends are equal
  • Write a singleton class in Java
  • Write a java program to reverse a string?

Recent Questions

  • What are the modules of spring framework?
  • List some of the Spring Framework Annotations?
  • How many types of association mapping are possible in hibernate?
  • Define persistent classes?
  • What is HQL?

  • Contact

All Right Reserved © Online Note