Posts

प्रेरणादायक विचार

  सपनों को सच करने के लिए पहला कदम उठाना ज़रूरी है। हर बड़ा सफर एक छोटे कदम से शुरू होता है। समय सबसे बड़ा शिक्षक है, इसे व्यर्थ न जाने दें। समय की कीमत समझें और उसे सही दिशा में लगाएं। असफलता सफलता की सीढ़ी है। हर हार से सीखकर आगे बढ़ें। जो लोग मेहनत से डरते हैं, वे सफलता का स्वाद नहीं चख सकते। निरंतर प्रयास ही जीत की कुंजी है। खुद पर विश्वास रखें, आधी लड़ाई वहीं जीत जाएंगे। आत्मविश्वास सबसे बड़ी ताकत है। हर सुबह एक नया अवसर लेकर आती है। कल की गलतियों से सीखें और आज को बेहतर बनाएं। छोटी सोच से बड़े सपने नहीं देखे जा सकते। अपने दायरे को बढ़ाएं और ऊंचा सोचें। जो खुद को बदल सकता है, वही दुनिया बदल सकता है। सुधार की शुरुआत खुद से करें। परिस्थितियां कैसी भी हों, अपने लक्ष्य को मत छोड़ें। मुश्किलें केवल आपको मजबूत बनाती हैं। हार मान लेना स्थाई असफलता है। कोशिश जारी रखें, सफलता जरूर मिलेगी। सकारात्मक सोच से जीवन में चमत्कार होते हैं। नेगेटिविटी को दूर रखें। अपने कर्म पर ध्यान दें, फल अपने आप मिल जाएगा। गीता का यही सन्देश है। ज्ञान सबसे बड़ा धन है, इसे हर रोज़ बढ़ाएं। सीखना कभी बंद...

10 basic Java interview questions with their answers

  1. What is Java? Answer: Java is a high-level, object-oriented programming language developed by Sun Microsystems (now owned by Oracle). It is platform-independent due to its "Write Once, Run Anywhere" (WORA) capability achieved through the Java Virtual Machine (JVM). 2. What are the key features of Java? Answer: Object-Oriented : Everything in Java is treated as an object. Platform-Independent : Java code runs on any platform that supports JVM. Robust : Provides strong memory management and exception handling. Multithreaded : Supports concurrent execution of two or more threads. Secure : Includes security features like cryptography and runtime checks. 3. What is the difference between JDK, JRE, and JVM? Answer: JDK (Java Development Kit) : Includes tools for developing Java applications, like compilers and libraries. JRE (Java Runtime Environment) : Provides libraries and JVM to run Java applications. JVM (Java Virtual Machine) : Executes Java bytecode and ensures platform...

Internals of database connectivity in java

Java Database Connection Database connection in java is very important process in JDBC. This post is for demonstrating internals of java database connectivity. In this post we will get to know How to connect with database in java, Java database connectivity, internals of database connectivity in java. I will also give a sample example of java database connectivity. For database connection we need to import some packages and need to use some special methods. Before getting into deep I will explain about these methods and packages. Following is details of how to connect with database. Step by step explanation of Java database connection- 1. Import Package-   For creating database connection you need some functions and classes. These functions and classes are found in a package so we need to import that package using "import java.sql.*". 2. Loading Driver-   Driver is required for conversion of sql statements into back end database understandable form and vice ve...

Internals of Stored Procedure - JDBC

STORED PROCEDURE This post is very useful to know about internals of Stored Procedure. JDBC is used for database operations in java and Stored procedures are used for eliminating overhead from Java. Internals of Stored-Procedure will cover all the concepts like What is Stored Procedure, What is procedure, When do people prefer Stored Procedure, Advantages and uses of Stored Procedure, Disadvantage or flaws of Stored Procedures, API of Stored Procedure, Types of Procedure etc… Before knowing about Stored Procedure we should know about What is Procedure? Procedure is nothing, It is a only function or method of database. These database methods contains group of SQL statements. We create procedure using PL/SQL programming. Stored Procedure is nothing but it is one of the most useful mechanism for creating procedure in the database and called by java program is known as Stored Procedure. There is a one big question that When do we prefer using Stored-Procedure? The answer of thi...

Internals of Java Interface

Interface Internals in JAVA Little description of java internals about Interface : Some people say, Interface is used to implement the concept of Multiple Inheritance,but purpose of Interface is not implementing the concept of Multiple Inheritance in Java, although it looks like Multiple Inheritance. Apart from this It is very important to know that why do we need Interface? The answer is that, If we know about the entity, but don't know about the behavior then we need Interface. A very simple example of Interface is as follows- interface Animal  {    void eat ();   } class Goat implements Animal   {     Void eat ()       {          System.out.println ("Goat is eating grass");       }   } class Dog implements Animal   {        void eat ( )        {           System....

Types of Final Variable in Java

Final Variable Before knowing types of final variable you should know What is a Final Variable? Final variable is a variable which  is declared using final keyword before it. For example, Class Tst  {    int final var1 = 10; // var1 is declared as final variable... } There are two very important related to Final Variables that are- 1. Final Variable's value never changes. 2. Final variable must be declared during declaration time. Now, we will discuss about Types of Final variable. There are following types of final variables- 1. Final Instance Variable 2. Final Static Variable 3. Final Local Variable 4. Final Block Level Variable 5. Final Parameterized Variable 1. Final Instance Variable  -   Those variables which are declared as Final Instance i.e. Final                                           ...

List of all keywords and reserved words in java

Java Keywords What is a keyword? Keyword is a special word/reserved word which is already defined in the compiler. We can not use keywords in our program for declaring any variable or program name or in other declarations. Keywords definition is defined in the compiler. For example, If you try to declare a variable with name 'try' that is not possible as 'try' is a keyword in java language. See following example.      class Testpgm  {     int try; //this variable can not be declared....     public static void main (String[] args )       {        //class code....       }    }   Below is lists of all Java keywords- There are 53 keywords in java. 1. 48 special words. 2. 3 special words. 3. 2 unused words. 2 unused keywords ================ 1. goto 2. const 3 reserve words =============== 1. null 2. true 3. false 48 special words ================ keywo...