Programming Languages

Programming Languages: Prepare Programming Languages Interview Questions, Answers, Tips, news, tutorials. Find Programming Languages Questions asked in various companies, Get Career advice & Interview Procedures from Programming Languages experts.

  • Why Introspection is used in Java?
    Advanced Java

    Posted By: clemmiebrotherto

  • What are anonymous classes in PHP7.
    Php 7

    Posted By: Annie

    Anonymous Class in PHP is new way of creating object without the need to name them. Anonymous classes are created and initiated at same time.

    Example of an Anonymous Class in PHP

    $object =new class('argument'){
    
    public $property;
    
    public function __construct($argument){
    
    	$this->property=$argument;
    
    }
    
    }
    

  • What invokes the thread's run() method ?
    Advanced Java

    Posted By: Poornima

  • What is Coercive mode in PHP?
    Php 7

    Posted By: Gene

    Coercive mode in PHP is the default mode of Scalar type declarations (Feature introduced in PHP 7).

  • What is Strict mode in PHP?
    Php 7

    Posted By: Prashant

    Strict mode is new feature in PHP in which variable declaration is required before using it.

  • Why String is immutable in Java?
    Core Java

    Posted By: Smith

  • What are Array constants?
    Php 7

    Posted By: Dana

    In PHP 5.6 or we can define constants as a scalar expression. We can define an array constant using the define keyword.

    Array Constant Example in PHP

     define('fruits', [
          'apple',
          'mango',
          'banana'
       ]);
     print(fruits[2]); // outputs banana
    

  • Explain the difference between a process and a thread?
    Core Java

    Posted By: Wilber

  • Explain Spaceship Operator?
    Php 7

    Posted By: Marcel

    Spaceship operator also is known as (combined comparison operator) is a new operator introduced in PHP 7. This operator is denoted by "<=>". This single operator can perform greater than, less than, and equal comparison between two operands. Its behavior is similar like strcmp() or version_compare() functions and can be used with integers, floats, strings, arrays, objects, etc.

  • How to sort a List of Java Bean in Ascending Order?
    Core Java

    Posted By: CarlosBivatte

  • What is use of random_bytes() in PHP?
    Php 7

    Posted By: EvgeniaAnd

    random_bytes() function in PHP is used to generate cryptographically secure pseudo-random bytes.

    Syntax:

    String random_bytes ( int $length )
    

    Usage

    $length = random_bytes('4'); 
      
    //Print the reult and convert by binaryhexa 
    var_dump(bin2hex($length)); 
    
    

  • What are the difference between Java arrays and Collections?
    Core Java

    Posted By: Anonymous

  • List some features of PHP that are deprecated in PHP 7?
    Php 7

    Posted By: Manjiri Kulkarni

    PHP Features that are deprecated in PHP 7 are.

    • PHP 4 style constructors
    • Static calls to non-static methods
    • password_hash() salt option
    • capture_session_meta SSL context option

  • How to sort a collection in Java?
    Core Java

    Posted By: Roland

  • What is use of set_exception_handler() in PHP?
    Php 7

    Posted By: Anonymous

    set_exception_handler() is a library function in PHP. It is used to set the default exception handler if an exception is not caught within a try/catch block in PHP.exception_handler stop the execution of script.

  • What are wrapper classes?
    Core Java

    Posted By: JesseThick

  • List some extensions have been removed from PHP 7?
    Php 7

    Posted By: Sol

    Following extensions are removed from PHP and are no longer in use

    • ereg
    • mssql
    • mysql
    • sybase_ct

    Read More from https://www.php.net

  • List few differences between Array list and vector in Java?
    Core Java

    Posted By: Quincy

  • Why main() method of Java program must be static?
    Core Java

    Posted By: Ella

  • What are access modifiers in java?
    Core Java

    Posted By: Bruce

  • How to create immutable class in java?
    Core Java

    Posted By: Gerhard

  • Give me a real time example of Abstraction?
    Core Java

    Posted By: Caleb

  • What is the Dictionary class?
    Core Java

    Posted By: Guss

  • Can you create an instance of interface?
    Core Java

    Posted By: Wood

  • What is implicit casting in Java?
    Core Java

    Posted By: Ervin

  • What is JIT ?
    Core Java

    Posted By: Allen

  • What does System.gc() and Runtime.gc() methods do?
    Advanced Java

    Posted By: Direct Lender Loans

  • What are Checked and Unchecked exceptions in Java?
    Core Java

    Posted By: Sheldon

  • What is default access modifier of an Interface in Java?
    Core Java

    Posted By: Fifium App Development

  • Why to use Iterator in Java? Is it is an Interface or Class?
    Core Java

    Posted By: Glen

  • What is garbage collector in java?
    Core Java

    Posted By: Curley

  • What is use of transient keyword in Java?
    Core Java

    Posted By: kato

  • How to suspend a thread?
    Core Java

    Posted By: Carson

  • What is deadlock? How can you prevent it, avoid it?
    Core Java

    Posted By: Adolf

  • What is a NullPointerException?
    Core Java

    Posted By: Jasper

  • What is the difference between Iterator and Enumeration in Java?
    Core Java

    Posted By: Ora

  • In how many ways a thread can be created in Java?
    Core Java

    Posted By: Brooks

  • Explain Stream Tokenizer in Java?
    Core Java

    Posted By: Baldwin

  • How to convert a string to long in Java?
    Core Java

    Posted By: uqtifanano

  • How to add and remove nodes in Jtree?
    Core Java

    Posted By: Hans

  • How do I break out of nested loops in Java?
    Core Java

    Posted By: Cas

  • How to calculate difference between two dates in Java?
    Core Java

    Posted By: Cyril

  • What is Double Brace initialization in Java?
    Core Java

    Posted By: Chauncey

  • Why do we need constructor in Java?
    Core Java

    Posted By: Michel

  • How many ways you can create an object in java ?
    Advanced Java

    Posted By: Ram Lakhan

  • How to write custom class Loader ?
    Advanced Java

    Posted By: Kit

  • Explain the difference between ArrayList and Vector?
    Core Java

    Posted By: Valentine

  • How to name a thread in executor service ?
    Advanced Java

    Posted By: Raoul

  • Is there any difference between a = a + b and a += b expressions in Java?
    Core Java

    Posted By: Newton

  • What are raw types in Java?
    Core Java

    Posted By: Milton

  • How to check if a file exists or not in Java?
    Core Java

    Posted By: GORU RAVi

  • How to print nodes of a Binary tree in Java?
    Core Java

    Posted By: Arther

  • What are Inner classes in Java?
    Core Java

    Posted By: Dipali Sharma

  • Is 'sizeof' is a keyword or method in Java?
    Core Java

    Posted By: Joseph

  • Explain What is Connection Pooling?
    Core Java

    Posted By: Wylie

  • What is the default initialized value of a String in Java.
    Core Java

    Posted By: Father

  • What is Static binding ?
    Core Java

    Posted By: Rodney

  • Difference between sleep and suspend ?
    Core Java

    Posted By: MichaeltoX

  • What is JAR file?
    Core Java

    Posted By: Jonathan

  • What is super in Java?
    Core Java

    Posted By: Ethan

  • What is classloader in Java?
    Core Java

    Posted By: Clay

  • What is difference between final, finally and finalize?
    Core Java

    Posted By: Sterling

  • What is Externalizable?
    Core Java

    Posted By: Wilfred

  • What is the difference between JVM and JRE?
    Core Java

    Posted By: Bennett

  • How to interrupt a thread explicitly ?
    Core Java

    Posted By: Willie

  • What is difference between DTO, VO, POJO, JavaBeans?
    Advanced Java

    Posted By: Art

  • How to use JNDI is used in JMS?
    Advanced Java

    Posted By: Stuart

  • List the types of data passing mechanisms?
    Advanced Java

    Posted By: Claudiuslest

  • How to implement RMI in Java
    Advanced Java

    Posted By: bharadwaja

  • What is the use of Semaphore?
    Advanced Java

    Posted By: Patricksic

  • What is difference between core Java and Java EE?
    Core Java

    Posted By: Dan

  • What is runnable?
    Core Java

    Posted By: Charlie Pan

  • What is thread deadlock? How to resolve thread?
    Advanced Java

    Posted By: Carson

  • What is the difference between a StringBuffer and String in Java?
    Core Java

    Posted By: Bert

  • Describe the differences between C++ and Java.
    Core Java

    Posted By: Ambers

  • What is difference between Abstract and final?
    Core Java

    Posted By: akshay anand

  • Why java doesn't support multiple inheritance?
    Core Java

    Posted By: Obed

  • How would you design a garbage collector?
    Core Java

    Posted By: Rajat

  • Does Java support pointer variables?
    Core Java

    Posted By: AnHo

  • How to implement multithreading in Java?
    Core Java

    Posted By: Robertrof

  • What is difference between JVM and JRE?
    Core Java

    Posted By: Alvah

  • What is difference between call by value and call by reference?
    Core Java

    Posted By: Charlie

  • Explain final, finally, finalize difference
    Core Java

    Posted By: Raymond

  • What is the difference between JDK and JVM?
    Core Java

    Posted By: Guadalupe

  • What is overloading and overriding in java?
    Core Java

    Posted By: Daisy

  • What is Enum in Java?
    Core Java

    Posted By: kato

  • What is instanceof keyword?
    Core Java

    Posted By: Burl

  • What is the final method?
    Core Java

    Posted By: Anonymous

  • What is the final blank variable?
    Advanced Java

    Posted By: SamanthaDar

  • What is a transient variable?
    Advanced Java

    Posted By: Larkin

  • When a thread blocks on I/O, in which state it enters?
    Advanced Java

    Posted By: Addie

  • What is the use of % operator?
    Advanced Java

    Posted By: kumar1975

  • What is an immutable class?
    Advanced Java

    Posted By: Leander

  • What is difference between HashMap and HashTable?
    Advanced Java

    Posted By: Stacy

  • What is use of intern() method in Java?
    Advanced Java

    Posted By: Crawford

  • What is JCA and JPA in java?
    Advanced Java

    Posted By: atul

  • What is OutOfMemoryError in Java? How do you deal with that?
    Advanced Java

    Posted By: Nathan

  • What is the maximum Heap Size of 32 bit or 64-bit JVM in Windows and Linux?
    Advanced Java

    Posted By: Delbert

  • What is the difference between JDBC and JNDI?
    Advanced Java

    Posted By: Anonymous

  • What is JAVA_HOME environment variable?
    Core Java

    Posted By: rachelparadis