Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online Java Coding Test – Basic Level

Topics Covered

  • Class
  • Object Concepts
  • Variables
  • Operators
  • Loops
  • Methods
  • Constructors
  • Coding

Useful for hiring

  • Junior Java Developer
  • Entry Level Java Developer
  • Java Programmer (0-2 yrs of exp.)

Start hiring job-fit candidates using this assessment

GET A DEMO

"Interview Mocha has provided UNEECOPS with a veritable assessment platform with a comprehensive test library, online test platform, and intelligent reports. This made it easier for us to map different job openings with job-fit candidates and recruit faster."

Nisha Chandila, UNEECOPS,
Talent Acquisition Manager
Question

Write a program that prints the numbers from 1 to 20. 

For multiples of 3, print usb instead of the number and for multiples of 5, print device
For numbers which are multiples of both 3 and 5, print usbdevice

Print a new line after each string or number.

Question

You have a case in your java application where you have a string defined and you wish to modify this string by adding a special character (#) before and after every character in the string.
Which of the following code can be used to implement the above scenario? 

[Assume that if the input is sample ,the corresponding output will be #s#a#m#p#l#e#]

Answer
    • String inp = "sample";
      inp = "#" + inp.replaceAll("(.)","$1#");
      System.out.println(inp);
       

    • String inp = "sample";
      inp = "#" + inp.replaceAll("(.)","$1%");
      System.out.println(inp);
       

    • String inp = "sample";
      inp = "#" + inp.replaceAll("(.)","$1%") + “#”;
      System.out.println(inp);
       

    • String inp = "sample";
      inp = "%" + inp.replaceAll("(.)","$1%");
      System.out.println(inp);
       

Question

It is said in java that “Everything created is an object”.
You define the following string array:

String arr[] = {"Sample1", "Sample2", "Sample3", "Sample4"};

Which of the following is the correct number of objects created with the above array?

Answer
    • 4
       

    • 5
       

    • 8
       

    • 9
       

Test details:

The Java interview programming skills test (Basic Level) enables employers and recruiters to identify potential hires by evaluating working skills and job readiness. For this reason in Java programmer test, emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience rather than theoretical knowledge.

This Java coding online test contains MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, True or False.

Online Java Programming Test Duration: 50 minutes

  • 10 Application and Theory Oriented Questions

  • 02 Coding Questions


Java programming online test contains the combination of application and theory questions. Online Java interview programming test (basic level) helps you to evaluate technical as well as practical skills of candidates.

Test description:

Online Java Coding Test (Basic) has been specially designed & validated by experienced Subject Matter Experts (SME)s to validate the basic level Java coding skills of the Java programmer - as per Industry Standards.

Java is a simplified object-oriented programming language & a computing platform. Java source code files are compiled into a format called bytecode which can then be executed by a Java interpreter. Compiled Java code can run on any Java Virtual Machines (VMs) that exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Due to its fast, secure & reliable nature, Java programming language is widely used & is one of the most popular languages. Therefore, organizations are in a constant search of expert Java programmers.

Thus, the basic level online Java programming test helps recruiters & hiring managers to assess Java programming skills of the candidates before hiring.

The Java interview test contains meaningful questions on following Topics:
 

  • Class 

  • Object Concepts 

  • Variables 

  • Operators 

  • Loops 

  • Methods 

  • Constructors

  • Coding


Evaluate the coding skills of programmers using Java coding test for experienced candidates. Our intelligent reports on Java interview coding test will provide you with the detailed analysis of skills related strengths & weaknesses of the candidates that will help you in making right hiring decisions.

We provide the facility of custom made java programmer test where you can create the test for experienced as well as for freshers, tailored for your job needs.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO