Pre-Employment tests: Difference between revisions

From My Limbic Wiki
 
(One intermediate revision by the same user not shown)
Line 44: Line 44:
* Biometric datas
* Biometric datas
=Standard Traps (in Java)=
=Standard Traps (in Java)=
==Java: Equality Test - Strings & Integers==
    /** Exec: http://tpcg.io/UxQq4J */
     public class EqualityTest{
     public class EqualityTest{
        /**
      /**
        * In Java, string equals() method compares the two given strings
        * In Java, string equals() method compares the two given strings
        * based on the data/content of the string
        * based on the data/content of the string
        **/
        **/
        public static void main(String []args){
        public static void main(String []args){
            System.out.println("########## Testing Strings ##########");
          System.out.println("########## Testing Strings ##########");
            testStrings();
          testStrings();
            System.out.println("########## Testing Numbers ##########");
          System.out.println("########## Testing Numbers ##########");
            testNumbers();
          testNumbers();
        }
        }
       
       
        public static void testStrings(){
        public static void testStrings(){
             String a = "test";
             String a = "test";
             String b = "test";
             String b = "test";
            String c = "TEST";
             String objA = new String("test");
             String objA = new String("test");
             String objB = new String("test");
             String objB = new String("test");
              
              
            System.out.println("#### - A - ####");
             System.out.println(a==b);              //true
             System.out.println(a==b);              //true
             System.out.println(objA==objB);        //false
             System.out.println(objA==objB);        //false
             System.out.println(a==objA);            //false
             System.out.println(a==objA);            //false
            System.out.println(a.hashCode());      //3556498
              
              
            System.out.println("#### - B - ####");
             System.out.println(a.equals(b));        //true
             System.out.println(a.equals(b));        //true
             System.out.println(objA.equals(objB));  //true
             System.out.println(objA.equals(objB));  //true
             System.out.println(a.equals(objA));    //true
             System.out.println(a.equals(objA));    //true
           
            System.out.println(b.hashCode());      //3556498
        }
              
        public static void testNumbers(){
             System.out.println("#### - C - ####");
             int one = 1;
             System.out.println(a==c);               //false
             int two = 1;
             System.out.println(c.hashCode());       //2571410
             int objOne = new Integer(1);
             int objTwo = new Integer(1);
              
              
            System.out.println(one==two);          //true
        }
            System.out.println(objOne==objTwo);    //true
        public static void testNumbers(){
            System.out.println(one==objOne);        //true
          int one = 1;
          int two = 1;
          int objOne = new Integer(1);
          int objTwo = new Integer(1);
         
          System.out.println(one==two);          //true
          System.out.println(objOne==objTwo);    //true
          System.out.println(one==objOne);        //true
         
          // error: int cannot be dereferenced
          //System.out.println(one.equals(two));   
          //System.out.println(objOne.equals(objTwo));
          //System.out.println(one.equals(objOne));
              
              
            // error: int cannot be dereferenced
        }
            //System.out.println(one.equals(two));   
            //System.out.println(objOne.equals(objTwo));
            //System.out.println(one.equals(objOne));
           
        }
     }
     }


Line 124: Line 131:


==SQL: Tests with Null==
==SQL: Tests with Null==
     /** Exec: jdoodle.com/a/1sJB */
     /** Exec: https://jdoodle.com/a/1sJB */
     create table sample(id int not null, name varchar);
     create table sample(id int not null, name varchar);



Latest revision as of 04:49, 30 August 2019

Personality Test

http://www.journaldunet.com/management/0607/0607143-tests-personnalite.shtml

  • L'extraversion,
  • La conscience professionnelle,
  • La stabilité émotionnelle,
  • L'ouverture d'esprit,
  • La convivialité.

MTBI

Ce test permet de positionner le candidat sur quatre échelles bipolaires, codifiées chacune par une lettre :

  • Orientation de l'énergie : E extraversion - I introversion
  • Recueil d'information : S sensation - N intuition
  • Critère de prise de décision : T pensée logique - F sentiments
  • Mode d'action : J jugement - P perception

Cognitive Tests

  • TELUQ - English, French, Mathematics

Emotional Intelligence

Logical Reasoning Test

English Proficiency Tests

Grammary

www.anglaisfacile.com

Irregular Verbs

wikipedia:en: English_irregular_verbs

Sample Job Task Tests

Background Checks and Credit Checks

  • Police Check
  • Biometric datas

Standard Traps (in Java)

   public class EqualityTest{
      /**
       * In Java, string equals() method compares the two given strings
       * based on the data/content of the string
       **/
       public static void main(String []args){
          System.out.println("########## Testing Strings ##########");
          testStrings();
          System.out.println("########## Testing Numbers ##########");
          testNumbers();
       }
       
       public static void testStrings(){
           String a = "test";
           String b = "test";
           String c = "TEST";
           String objA = new String("test");
           String objB = new String("test");
           
           System.out.println("#### - A - ####");
           System.out.println(a==b);               //true
           System.out.println(objA==objB);         //false
           System.out.println(a==objA);            //false
           System.out.println(a.hashCode());       //3556498
           
           System.out.println("#### - B - ####");
           System.out.println(a.equals(b));        //true
           System.out.println(objA.equals(objB));  //true
           System.out.println(a.equals(objA));     //true
           System.out.println(b.hashCode());       //3556498
           
           System.out.println("#### - C - ####");
           System.out.println(a==c);               //false
           System.out.println(c.hashCode());       //2571410
           
       }
       public static void testNumbers(){
          int one = 1;
          int two = 1;
          int objOne = new Integer(1);
          int objTwo = new Integer(1);
          
          System.out.println(one==two);           //true
          System.out.println(objOne==objTwo);     //true
          System.out.println(one==objOne);        //true
          
          // error: int cannot be dereferenced
          //System.out.println(one.equals(two));    
          //System.out.println(objOne.equals(objTwo)); 
          //System.out.println(one.equals(objOne)); 
           
       }
   }

Java: Inheritance Test

Invalid Code

   /** Exec : http://tpcg.io/rfVz8w */
   public class A{
       /**
        * error: incompatible types: A cannot be converted to B
        **/
        public static void main(String []args){
            B b = new A();
        }
   }
   class B extends A{}

Valid Code

   /**
    * Exec: http://tpcg.io/9V1atN
    * This sample is compiling, OK
    **/
   public class A{ 
       /** 
        * In this case, "main" method is required here, if not it is generating the following error:
        * Error: Main method not found in class A, please define the main method as
        **/
        public static void main(String []args){ }
   }
   class B extends A{
        public static void main(String []args){
            A a = new B();
        }
   }

SQL: Tests with Null

   /** Exec: https://jdoodle.com/a/1sJB */
   create table sample(id int not null, name varchar);
   insert into sample values(0, "Clark");
   insert into sample values(1, "Lois");
   insert into sample values(2, "");
   insert into sample values(3, "Bruce");
   insert into sample values(4, NULL);
   insert into sample values(5, "Tony");
   insert into sample values(6, "Howlett");
   insert into sample values(7, "Peter");
   select * from sample where name is null;    /* 2 Lines returned - id 2 and 4 */
   select * from sample where name = "";       /* 1 Line returned  - id 2 */
   select * from sample where name = null;     /* 0 Lines returned */