
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
AmitDiwan has Published 10744 Articles

AmitDiwan
776 Views
You can use REGEXP. Let us first create a table −mysql> create table DemoTable ( Name varchar(100) ); Query OK, 0 rows affected (1.61 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('JohnSmith'); Query OK, 1 row affected (0.73 sec) mysql> insert into DemoTable ... Read More

AmitDiwan
1K+ Views
Following is the Java program to print Triangle pattern −Example Live Demoimport java.util.*; public class Demo{ public static void main(String[] args){ Scanner my_scan = new Scanner(System.in); System.out.println("Enter the number of rows which needs to be printed"); int my_row = my_scan.nextInt(); ... Read More

AmitDiwan
1K+ Views
Following is the Java program to print integer between Strings −Example Live Demopublic class Demo{ public static void main(String[] args){ System.out.println("The equals symbol is present between two integer values "); System.out.println(45+5 + "=" +(56+11)); System.out.println(45+5 + " equals symbol " +(56+11)); ... Read More

AmitDiwan
1K+ Views
Following is the code to rename multiple files using Java −Exampleimport java.io.File; import java.io.IOException; public class Demo{ public static void main(String[] argv) throws IOException{ String path_to_folder = "path\to\folder\where\multiple\files\are\present"; File my_folder = new File(path_to_folder); File[] array_file = my_folder.listFiles(); ... Read More

AmitDiwan
3K+ Views
Following is the code to clear screen using Java −Example Live Demopublic class Demo{ public static void main(String[] args){ System.out.print("\033[H\033[2J"); System.out.flush(); } }OutputThe screen would be clearedA class named Demo contains the main function. Here, the ANSI escape code is written, that clears ... Read More

AmitDiwan
195 Views
Following is the Java program to find the vertex, focus and directrix of a parabola −Example Live Demopublic class Demo{ public static void find_values(float val_1, float val_2, float val_3){ System.out.println("The value of vertex is (" + (-val_2 / (2 * val_1)) + ", "+ (((4 * val_1 ... Read More

AmitDiwan
274 Views
Following is the Java code to find the perimeter of a cylinder −Example Live Demoimport java.io.*; public class Demo{ static int find_peri(int dia, int ht){ return 2*(dia + ht); } public static void main(String[] args){ int dia = 7; ... Read More

AmitDiwan
3K+ Views
Following is the Java code to find the largest prime factor of a number −Example Live Demoimport java.io.*; import java.util.*; public class Demo{ static long maxPrimeFactors( long val){ long max_prime = -1; while (val % 2 == 0) { max_prime ... Read More

AmitDiwan
185 Views
Followimg is the code to implement String formatting in Java using % −Example Live Demopublic class Demo { public static void main(String args[]){ String my_str = " sample."; String concat_Str = String.format("This is a" + "%s", my_str); String format_str_1 = String.format("The ... Read More