
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Programming Articles - Page 2561 of 3366

3K+ Views
A super keyword is a reference of the superclass object in Java. Using this, you can invoke the instance methods constructors and, variables, of a superclass.Calling the constructor of a superclassYou can call the constructor of a superclass from the subclass’s constructor.ExampleConsider the following example, it has two classes SuperClass class and SubClass where the SubClass extends the SuperClass. The superclass has a parameterized constructor, we are invoking it from the subclass using the "super" keyword. Live Democlass SuperClass{ SuperClass(int data){ System.out.println("Superclass's constructor: "+data); } } public class SubClass extends SuperClass{ SubClass(int data) { ... Read More

1K+ Views
The "this" keyword in Java is used as a reference to the current object, within an instance method or a constructor. Using it, you can refer the members of a class such as constructors, variables, and methods.Assigning reference to "this"According to the definition "this" is a keyword which acts as a reference to the current object (the object from whose constructor/method you are using it), its value id is fixed. Therefore, you cannot assign a new reference value to it. Moreover, it is just a keyword, not a variable.Still, if you try to it assign a reference value to "this" it ... Read More

7K+ Views
In this article, we will learn about the basic structure of a program in Java. Java is widely used for developing large-scale applications, including Android apps, web applications, and enterprise software. To write a Java program, it's essential to understand its basic structure, which consists of several key components. Components A typical structure of a Java program contains the following elements: Package declaration Import statements Comments Class definition Class variables, Local variables Methods/Behaviors ... Read More

1K+ Views
A persistent cookie is a cookie that is stored in a cookie file permanently on the browser's computer. As we know cookies are small text files which are as a matter, of course, temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased from the memory.When to use persistent cookies −Temporary cookies can not be used for tracking long-term information.Persistent cookies can be used for tracking long-term information.Temporary cookies are safer because no programs other than the browser can access them.Persistent cookies are less secure because users can open cookie files ... Read More

323 Views
An exception is a problem that arised during the execution of a program. During the execution of a program when an exception occurs, code following the statement will not be executed, and PHP will attempt to find the first matching catch block. If an exception is not caught, a PHP Fatal Error will be issued with an “Uncaught Exception”.Syntax try { print "this is our try block"; throw new Exception(); }catch (Exception $e) { print "something went wrong, caught yah! n"; }finally { ... Read More

3K+ Views
In Java, non-static blocks run before the constructor whenever an object is created. If multiple non-static blocks exist, they execute in the order they appear in the class, followed by the constructor. In this article, we will understand this order of execution with the help of examples. What Are Non-Static Blocks in Java? The Non-static blocks are class-level blocks which don't contain a prototype. A non-static block must perform any logic whenever an object is instantiated, regardless of the constructor. The Non-static blocks are automatically called by the JVM for every object creation in the Java stack area. We can ... Read More

240 Views
The substring() method returns a String datatype which corresponds to the original String starting from the begin index until the end Index. If the end index is not specified, it is imperative that the endIndex is the String length. Since we are dealing with the String, the index starts at '0' position.Syntaxpublic String substring(int beginIndex) public String substring(int beginIndex, int endIndex)beginIndex: the starting index or position where we want to start to cut or substring our String.endIndex: the end index or position where we want to end our cutting or substring our String.This method returns a String datatype which corresponds to the ... Read More

1K+ Views
The UncaughtExceptionHandler is an interface inside a Thread class. When the main thread is about to terminate due to an uncaught exception the java virtual machine will invoke the thread’s UncaughtExceptionHandler for a chance to perform some error handling like logging the exception to a file or uploading the log to the server before it gets killed. We can set a Default Exception Handler which will be called for the all unhandled exceptions. It is introduced in Java 5 Version.This Handler can be set by using the below static method of java.lang.Thread class.public static void setDefaultUncaughtExceptionHandler(Thread.UncaughtExceptionHandler ueh)We have to provide an implementation of the interface ... Read More

1K+ Views
A Java program can execute in the Java Virtual Machine (JVM) and uses the heap memory to manage the data. If our Java program requires more memory, there is a possibility that the Java Virtual Machine(JVM) will begin to throw OutOfMemoryError instances when attempting to instantiate an object in Java. How to change/increase the JVM Heap Size? In Java, it is possible to increase the heap size allocated by the JVM: -Xms: Set an initial Java heap size JVM automatically manages the heap memory but we can ... Read More

8K+ Views
.htaccess is a configuration file for use on web servers running on the web apache server software. when a .htaccess file is placed in a directory which in turn loaded via the Apache web server, then the .htaccess file detected and executed by the Apache server software. .htaccess files can be utilized to modify the setup of the Apache server software to empower additional functionality and fetures that the apache web server softwatre brings to the table. We can use the .htaccess file for alteration various configuration in apache web server software. Some of them are listed below:ErrorDocumentsCreating custom error pages ... Read More