Samual Sam has Published 2492 Articles

Fade In Up Animation Effect with CSS

Samual Sam

Samual Sam

Updated on 13-Mar-2020 13:16:39

720 Views

To implement Fade In Up Animation Effect on an image with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: ... Read More

Usage of CSS :first-line pseudo-element

Samual Sam

Samual Sam

Updated on 13-Mar-2020 13:03:22

73 Views

Use this element to add special styles to the first line of the text in a selector. The following example demonstrates how to use the :first-line element to add special effects to the first line of elements in the document.ExampleLive Demo                 ... Read More

Java Program to Compare Strings

Samual Sam

Samual Sam

Updated on 13-Mar-2020 13:00:09

5K+ Views

You can compare two Strings in Java using the compareTo() method, equals() method or == operator.The compareTo() method compares two strings. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence ... Read More

Java Program to Convert Character to String

Samual Sam

Samual Sam

Updated on 13-Mar-2020 11:23:34

523 Views

The toString() method of the Character class converts the character to string. You can use this method to convert the given character to String.Exampleimport java.util.Scanner; public class CharToString {    public static void main(String args[]){       System.out.println("Enter a character ::");       Scanner sc = new Scanner(System.in); ... Read More

Java program to display English alphabets

Samual Sam

Samual Sam

Updated on 13-Mar-2020 10:20:56

290 Views

Following is an example to display English alphabets A to Z.ExampleLive Demopublic class DisplayingAtoZ {    public static void main(String args[]){       char ch;       System.out.println("List of alphabets are ::");       for(ch = 'A'; ch

Java program to find whether the given character is an alphabet or not

Samual Sam

Samual Sam

Updated on 13-Mar-2020 10:01:20

1K+ Views

Read a character from user verify whether it lies between a and z (both small and capital). If it does it is an alphabet.Exampleimport java.util.Scanner; public class AlphabetOrNot {    public static void main(String args[]){       System.out.println("Enter a character :: ");       Scanner sc = new ... Read More

Java program to find the area of a square

Samual Sam

Samual Sam

Updated on 13-Mar-2020 07:33:41

6K+ Views

A square is a rectangle whose length and breadth are same. Therefore, Area of a rectangle is the square of its length. so, to calculate the area of a squareGet the length of the square form the user.Calculate its square.Print the square.Exampleimport java.util.Scanner; public class AreaOfSquare {    public static ... Read More

Java program to print prime numbers below 100

Samual Sam

Samual Sam

Updated on 13-Mar-2020 06:59:36

737 Views

Any whole number which is greater than 1 and has only two factors that is 1 and the number itself, is called a prime number. Other than these two number it has no positive divisor. For example −7 = 1 × 7Few prime numbers are − 1, 2, 3, 5, ... Read More

How to write Java program to add two matrices

Samual Sam

Samual Sam

Updated on 13-Mar-2020 06:15:21

5K+ Views

To add two matrices −Create an empty matrixAt each position in the new matrix, assign the sum of the values in the same position from the given two matrices i.e. if A[i][j] and B[i][j] are the two given matrices then, the value of c[i][j] should be A[i][j] + B[i][j]ExampleLive Demopublic ... Read More

Java program to print a Fibonacci series

Samual Sam

Samual Sam

Updated on 13-Mar-2020 05:27:25

2K+ Views

Fibonacci Series generates subsequent number by adding two previous numbers. Fibonacci series starts from two numbers − F0 & F1. The initial values of F0 & F1 can be taken 0, 1 or 1, 1 respectively.Fn = Fn-1 + Fn-2Algorithm1. Take integer variable A, B, C 2. Set A = ... Read More

Advertisements