Junit Api called Jupiter (as we all know Jupiter is 5th planet in solar system) Jupiter : Its Junit 5 Vintage : is another set of Api that you can use where you are running older junit test, so that you can have your old junit which was written on junit 4 also can run parallel with your Junit 5(Jupiter) Ext 3rd Party : This is your own extensions which you have written and have it still use the platform to run the test case IDE : almost all IDE support junit 5 ( Like Eclipse, Intelij) means integrated system will allow you when you click on your Java Class file and write junit test file it will directly pop up with the java 5 Jupiter option Junit Jupiter 1. Its New Programming Model in Junit 2. Extension Model 3. What you will be primarily working with ...
How to Create Thread There are two ways to Create Thread 1 Extending Thread Class public class ThreadClass extends Thread { @Override public void run() { System . out .println( "Thread Running Thread " +Thread. currentThread ().getName()); } } 2. Runnable Interface public class RunnableClass implements Runnable { @Override public void run() { System. out .println( "Runnable Running Thread " +Thread. currentThread ().getName()); } } Main Class how to Call the Thread and Runnable Threads public class Main { public static void main(String[] args ) { ThreadClass tClass = new ThreadClass(); tClass .start(); RunnableClass rClass = new RunnableClass(); Thread rThread = new Thread( rClass ); rThread .start(); } } Both will Create the Similar Thread but there are some Advantages as Runnable Interface are 1. Less memory required for Runnable Interface 2. If a class is implementing the runnable interface then ...
Comments
Post a Comment