Karthikeya Boyini has Published 2383 Articles

How to specify the target media within the document language with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 16-Mar-2020 07:13:23

46 Views

To specify the target media, use the media attribute −Example    

Fade In Right Big Animation Effect with CSS

karthikeya Boyini

karthikeya Boyini

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

148 Views

To implement Fade In Right Big 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);             ... Read More

Convert the colors of the object to 256 shades of gray with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 13:19:34

96 Views

Use the grayscale effect to convert the colors of the object to 256 shaded of gray. The following parameter is used in this filter:ParameterDescriptionGrayConverts the colors of the object to 256 shades of gray.ExampleYou can try to run the following code to set grayscale effect:Live Demo         ... Read More

Which element is used to insert some content before an element with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 13:04:46

77 Views

Use the :before element to insert some content before any element. ExampleYou can try to run the following code to insert some content before an element with CSS −Live Demo                    p:before {             content: url(/images/bullet.gif)   ... Read More

Java Program to Convert a Stack Trace to a String

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 13:01:05

141 Views

The Java.io.StringWriter class is a character stream that collects its output in a string buffer, which can then be used to construct a string. Closing a StringWriter has no effect.The Java.io.PrintWriter class prints formatted representations of objects to a text-output stream.Using these two classes you can convert a Stack Trace ... Read More

Java program to calculate the GCD of a given number using recursion

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 12:54:09

3K+ Views

You can calculate the GCD of given two numbers, using recursion as shown in the following program.Exampleimport java.util.Scanner; public class GCDUsingRecursion {    public static void main(String[] args) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter first number :: ");       int firstNum ... Read More

Java Program to Append Text to an Existing File

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 12:39:44

6K+ Views

The Java.io.BufferedWriter class writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings. To add contents to a file − Instantiate the BufferedWriter class. By passing the FileWriter object as an argument to its constructor. Write data to the file using ... Read More

Java program to calculate the average of numbers in Java

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 11:17:58

11K+ Views

An average of a set of numbers is their sum divided by their quantity. It can be defined as −average = sum of all values / number of valuesHere we shall learn how to programmatically calculate average.Algorithm1. Collect integer values in an array A of size N. 2. Add all ... Read More

Java program to find the LCM of two numbers

karthikeya Boyini

karthikeya Boyini

Updated on 13-Mar-2020 10:29:51

7K+ Views

L.C.M. or Least Common Multiple of two values is the smallest positive value which the multiple of both values.For example multiples of 3 and 4 are:3 → 3, 6, 9, 12, 15 ... 4 → 4, 8, 12, 16, 20 ...The smallest multiple of both is 12, hence the LCM ... Read More

Java program to calculate student grades

karthikeya Boyini

karthikeya Boyini

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

13K+ Views

The following program accepts average from the user, calculates the grade and prints it.Examplepublic class CalculateStudentGrades {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter average of your marks (less than 100)::");       int average = sc.nextInt(); ... Read More

Advertisements