This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package stringTokenizer; | |
| import java.util.StringTokenizer; | |
| public class TokenizerExample { | |
| public static void main(String[] args) { | |
| String url = "https//www.facebook.com/slcoders"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package SLCoder; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| public class Buffer { | |
| public static void main(String[] args)throws Exception { | |
| //System.in get default input device - keyboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Father { | |
| //delete final to get rid from error | |
| public final void doingNow(){ | |
| System.out.println("reading book"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is a sample example for `JProgressBar`. This | |
| import java.awt.EventQueue; | |
| import java.beans.PropertyChangeEvent; | |
| import java.beans.PropertyChangeListener; | |
| import java.io.FileInputStream; | |
| import java.security.MessageDigest; | |
| import java.util.List; | |
| import javax.swing.JFrame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.event.MouseAdapter; | |
| import java.awt.event.MouseEvent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JLabel; | |
| public class Main { | |
| JFrame MainFrame; | |
| JFrame ChildFrame; | |
| JLabel label; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.EventQueue; | |
| import javax.swing.JFrame; | |
| import javax.swing.JButton; | |
| import java.awt.event.ActionListener; | |
| import java.awt.event.ActionEvent; | |
| public class Example { | |
| private JFrame frame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class Combinations { | |
| public static void main(String[] args) { | |
| List<String> list = new ArrayList<>(); | |
| int[] a = {0,1,2};//change values as many you want | |
| for(int i: a){ | |
| list.add(i+"");//add first numbers in array- 1,2,3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| B Liyanage asanka - code snippets for you. | |
| twitter - @bliyanageasanka | |
| */ | |
| import java.awt.BorderLayout; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------------------DDL----------------------- | |
| CREATE TABLE Customer( | |
| customerId INT PRIMARY KEY, | |
| name VARCHAR(30), | |
| age INT, | |
| phone CHAR(10) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import javax.swing.BoxLayout; | |
| import javax.swing.JButton; | |
| import javax.swing.JFrame; | |
| import javax.swing.JLabel; | |
| public class MainFrame { | |
| JFrame mainFrame; |
OlderNewer