What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-10 04:36:08
how to change a character in a string in java with ascii
import java.text.ParseException; import java.util.Arrays; /** * How to convert a String to ASCII bytes in Java * * @author WINDOWS 8 */ public class StringToASCII { public static void main(String args[]) throws ParseException { ... Add solution -
Java 2021-10-09 04:10:06
jdbc create a delete statement
//STEP 1. Import required packages import java.sql.*; public class JDBCExample { // JDBC driver name and database URL static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; static final String DB_URL = "jdbc:mysql://localhos... Add solution -
Other 2021-10-09 00:45:04
can we have any code between try and catch blocks
We shouldn’t declare any code between try and catch block. Catch block should immediately start after try block. try{ //code } System.out.println(“one line of code”); // illegal catch(Exception e){ // } Add solution -
Java 2021-10-08 13:56:09
java how to call getReader twice
public class CustomHttpServletRequestWrapper extends HttpServletRequestWrapper { private static final Logger logger = Logger.getLogger(CustomHttpServletRequestWrapper.class); private final String body; public CustomHttpServletRequestWrapper(HttpServletR... Add solution -
Java 2021-10-06 19:17:03
is try and catch block catching only one exception
class Main { public static void main(String[] args) { try { int array[] = new int[10]; array[10] = 30 / 0; } catch (ArithmeticException e) { System.out.println(e.getMessage()); } catch (ArrayIndexOutOfBoundsException e) { ... Add solution -
Java 2021-10-06 10:18:07
bufferedreader in java
try { File file = new File("data.txt"); BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while((line = reader.readLine()) != null) { System.out.println(line); } } catch(IOException e) { e.printStackTrac... Add solution -
Javascript 2021-10-05 07:07:04
como criar uam seessão com jsp
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1... Add solution -
Java 2021-10-05 00:30:05
java use thread pool executor
import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class TestThread { public static void main(final String[] arguments) throws InterruptedException { ThreadPoolEx... Add solution