Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

create database java

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCExample {
   static final String DB_URL = "jdbc:mysql://localhost/";
   static final String USER = "guest";
   static final String PASS = "guest123";

   public static void main(String[] args) {
      // Open a connection
      try(Connection conn = DriverManager.getConnection(DB_URL, USER, PASS);
         Statement stmt = conn.createStatement();
      ) {		      
         String sql = "CREATE DATABASE STUDENTS";
         stmt.executeUpdate(sql);
         System.out.println("Database created successfully...");   	  
      } catch (SQLException e) {
         e.printStackTrace();
      } 
   }
}
Comment

how to create database in java

go to firebase make a acounnt 
make app and add a app pk and name all info of your app
go to databaes realtime and get https of databaea and add for your app
and firebase give your many things like storge....
Comment

PREVIOUS NEXT
Code Example
Java :: how to make a typewriter effect in jaca 
Java :: open application programelly android studio 
Java :: Java Using Looping Construct to Copy Arrays 
Java :: subtract two variables in java 
Java :: The Unit Circle Codehs 
Java :: is type java 
Java :: springboot getting body value 
Java :: springBoot ConditionalOnMissingBean 
Java :: Volkswagen fox 
Java :: what does put extra do? 
Java :: kano magic wand 
Java :: jaspersoft masking 
Java :: younger brother of java 
Java :: custom validator arrays 
Java :: jsonStringToMap 
Java :: hierarchy inheritance gfg java 
Java :: javafx add vm options 
Java :: custom class level annotation in spring 
Java :: java active displays 
Java :: List of tuple to map + jpa 
Java :: Java int Keyword 
Java :: java schleifendurchläufe zählen 
Java :: hide tablayout tab android 
Java :: java mockito subclass mocken method 
Java :: online currency rate api 
Java :: Encrypt words facebook 
Java :: textbox to arraylist 
Java :: why is write replacing my text java 
Java :: Java/Perl - "sprintf function in java" or "string format" 
Java :: what is minecraft default render distance 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =