- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
Samual Sam
167 Views
The outline-width property is used to set the width of the outline. Its value should be a length or one of the values thin, medium, or thick, just like the border-width attribute.Example This text is having ... Read More
Samual Sam
1K+ Views
Import the following package for Calendar class in Java.import java.util.Calendar;Firstly, create a Calendar object and display the current date and time.Calendar calendar = Calendar.getInstance(); System.out.println("Current Date and Time = " + calendar.getTime());Now, let us increment the hours using the calendar.add() method and Calendar.HOUR_OF_DAY constant.calendar.add(Calendar.HOUR_OF_DAY, +5);Example Live Demoimport java.util.Calendar; public class Demo ... Read More
Samual Sam
745 Views
To implement animation on the border-color property with CSS, you can try to run the following codeExampleLive Demo div { width: 500px; height: 300px; background: yellow; border: 10px solid gray; animation: myanim 3s infinite; background-position: bottom left; background-size: 50px; } @keyframes myanim { 20% { border-color: red; } } Performing Animation for color of border
Samual Sam
206 Views
A diamond shape can be printed by printing a triangle and then an inverted triangle. An example of this is given as follows −* * * * * * * * * * * * * * * * * * * * * * * * * * * ... Read More
Samual Sam
1K+ Views
A ternary operator uses 3 operands and it can be used to replace the if else statement. This can be done to make the code simpler and more compact.The syntax of the ternary operator is given as follows −Expression ? Statement 1 : Statement 2In the above syntax, the expression ... Read More
Samual Sam
139 Views
The setBit() method is used in Java to return a BigInteger whose value is equivalent to this BigInteger with the designated bit set.Example Live Demoimport java.math.*; public class BigIntegerDemo { public static void main(String[] args) { BigInteger one, two; one = new BigInteger("7"); ... Read More
Samual Sam
103 Views
To flip a bit in a BigInteger in Java, use the flipBit() method. This method returns a BigInteger whose value is equivalent to this BigInteger with the designated bit flipped.Example Live Demoimport java.math.*; public class Demo { public static void main(String[] args) { BigInteger one, two; ... Read More
Samual Sam
177 Views
To create a queue using LinkedList class, try the following −Queue q = new LinkedList(); q.offer("abc"); q.offer("def"); q.offer("ghi"); q.offer("jkl"); q.offer("mno"); q.offer("pqr"); q.offer("stu"); q.offer("vwx");After that to print the elements, you need to use check a condition for Queue as shown below −Object ob; while ((ob = q.poll()) != null) { ... Read More
Samual Sam
2K+ Views
An element in an Java LinkedList can be replaced using the java.util.ArrayList.set() method. This method has two parameters i.e the index at which the LinkedList element is to be replaced and the element that it should be replaced with. ArrayList.set() method returns the element that was at the position specified ... Read More