Category: java

Email sending web application using java || JavaMail API.

How to send email from java web app using JavaMail API and SMTP. Here is the complete tutorial with source code to create java email web application. Email sending web application java. index.jsp <%@page import="mypack.MailCtl"%> <html> <style> div{ background-color: #7DB8F3; padding-bottom: 200px; } input,textarea{ width: 100%; padding: 20px; margin-bottom:20px; box-sizing: border-box; font-size: 20px; font-family: "Times New Roman"; }

Overriding equals method in Java

equals method in Java The equals method in Java is a method of class Object. Used to compare two object or two String literals in Java.It returns boolean true or false. When we need to compare two objects we need to Overriding equals method in Java. Let’s take an example where we are going to

Java tutorial || Overriding toString() method in Java.

toString() method in Java. toString() is a method of Object class. an Object is a superclass of every class in Java. toString() method returns the string representation of the object. Sometimes we need to override toString() method. so the question is that why we need to override the toString() method in Java. Let’s try to

StringBuffer class in Java.

Java StringBuffer class is a mutable class in java. It means We can change the string when we are going to use StringBuffer class in Java. StringBuffer is same as String class only the difference is it can be modified. Example: public class Main { public static void main(String args) { StringBuffer sb = new

String class in java with interview questions and answers

String class in java and its methods. A string is a class from lang package. Which is public and final class extends Object class and implements Serializable, Comparable<String>, CharSequence interface.  String Class in Java is immutable class. It means once you create an object of String class. It will not be modified read more about immutable String. Some