[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Basic Concepts Questions

NA
SHSTTON
84
Solv. Corr.
70
Solv. In. Corr.
154
Attempted
0 M:0 S
Avg. Time

31 / 64

Choose the correct option.

Which of the following are Java key words?


Adouble

BSwitch

Cthen

Dinstanceof

EBoth A & D

Answer: Option E

Explanation:

The only correct options are A and D. In option B, 'S' is capital, it should be small, and option C is incorrect because there is no keyword as 'then' in Java.

 

Workspace

NA
SHSTTON
63
Solv. Corr.
87
Solv. In. Corr.
150
Attempted
0 M:0 S
Avg. Time

32 / 64

Choose the correct option.

Which of the following keywords indicates a thread is releasing its Object lock?


Arelease

Bwait

Ccontinue

DnotifyAll

Answer: Option A

Explanation:

Option A is incorrect, as there is no keyword in Java as release.

Option C is incorrect, as continue keyword has nothing to do with locks.

Option D is incorrect, as notifyAll() method can be used in Java to give the notifications for all waiting threads of a particular object that the required lock is available.

Leaving us with option B, which is the correct option, because if a thread calls wait() method on any object, it immediately releases the lock of that particular object and enters into the waiting state.

Workspace

NA
SHSTTON
39
Solv. Corr.
122
Solv. In. Corr.
161
Attempted
0 M:4 S
Avg. Time

33 / 64

What is the output for the below code?
public class A {
int add(int i, int j){
return i+j;
}
}
public class B extends A{
public static void main(String argv[]){
short s = 9;
System.out.println(add(s,6));
}
}

ACompile fail due to error on line no 2

BCompile fail due to error on line no 9

CCompile fail due to error on line no 8

D15

Answer: Option B

Explanation:

Cannot call a non static method from a static method.

Workspace

NA
SHSTTON
33
Solv. Corr.
102
Solv. In. Corr.
135
Attempted
0 M:0 S
Avg. Time

34 / 64

What is the output for the below code ?
public class A {
int k;
boolean istrue;
static int p;
public void printValue() {
System.out.print(k);
System.out.print(istrue);
System.out.print(p);
}
}
public class Test{
public static void main(String argv[]){
A a = new A();
printValue();
}
}

A0 false 0

B0 true 0

C0 0 0

DCompile error - static variable must be initialized before use.

Answer: Option A

Explanation:

Default value of global and static int variable is zero. Default value of boolean variable is false.
More Info: Remember local variable must be initialized before use.

Workspace

NA
SHSTTON
35
Solv. Corr.
98
Solv. In. Corr.
133
Attempted
0 M:0 S
Avg. Time

35 / 64

What is the output for the below code?
public class Test{
int _$;
int $7;
int do;
public static void main(String argv[]){
Test test = new Test();
test.$7=7;
test.do=9;
System.out.println(test.$7);
System.out.println(test.do);
System.out.println(test._$);
}
}

A7 9 0

B7 0 0

CCompile error - $7 is not valid identifier.

DCompile error - do is not valid identifier.

Answer: Option D

Explanation:

You can't use a Java keyword as an identifier. do is a Java keyword.
More Info: $7 is valid identifier. Identifiers must start with a letter, a currency character ($), or underscore ( _ ). Identifiers cannot start with a number.

Workspace

NA
SHSTTON
33
Solv. Corr.
101
Solv. In. Corr.
134
Attempted
0 M:46 S
Avg. Time

36 / 64

What is the output for the below code?
package com;
class Animal {
public void printName(){
System.out.println("Animal");
}
}
package exam;
import com.Animal;
public class Cat extends Animal {
public void printName(){
System.out.println("Cat");
}
}
package exam;
import com.Animal;
public class Test {
public static void main(String[] args){
Animal a = new Cat();
printName();
}
}

AAnimal

BCat

CAnimal Cat

DCompile Error

Answer: Option D

Explanation:

Only public superclass can be accessible for different package.

Workspace

NA
SHSTTON
55
Solv. Corr.
63
Solv. In. Corr.
118
Attempted
0 M:0 S
Avg. Time

37 / 64

What is the output for the below code?
public class A {
int i = 10;
public void printValue() {
System.out.println("Value-A");
};
}
public class B extends A{
int i = 12;
public void printValue() {
System.out.print("Value-B");
}
}
public class Test{
public static void main(String argv[]){
A a = new B();
printValue();
System.out.println(i);
}
}

AValue-B 11

BValue-B 10

CValue-A 10

DValue-A 11

Answer: Option B

Explanation:

If you create object of subclass with reference of super class like ( A a = new B();) then
subclass method and super class variable will be executed.

Workspace

NA
SHSTTON
78
Solv. Corr.
93
Solv. In. Corr.
171
Attempted
0 M:0 S
Avg. Time

38 / 64

What is the output for the below code?
public enum Test {
BREAKFAST(7, 30), LUNCH(12, 15), DINNER(19, 45);
private int hh;
private int mm;
Test(int hh, int mm) {
assert (hh >= 0 && hh <= 2 : "Illegal hour.";
assert (mm >= 0 && mm <= 59) : "Illegal mins.";
this.hh = hh;
this.mm = mm;
}
public int getHour() {
return hh;
}
public int getMins() {
return mm;
}
public static void main(String args[]){
Test t = new BREAKFAST;
System.out.println(t.getHour() +":"+t.getMins());
}
}

A7:30

BCompile Error - an enum cannot be instantiated using the new operator.

C12:30

D7:45

Answer: Option B

Explanation:

As an enum cannot be instantiated using the new operator, the constructors cannot be called explicitly. You have to do like Test t = BREAKFAST;

Workspace

NA
SHSTTON
58
Solv. Corr.
59
Solv. In. Corr.
117
Attempted
0 M:0 S
Avg. Time

39 / 64

What is the output for the below code?
public class A {
static{System.out.println("static");}
{ System.out.println("block");}
public A(){
System.out.println("A");
}
public static void main(String[] args){
A a = new A();
}

AA block static

Bstatic block A

Cstatic A

DA

Answer: Option B

Explanation:

First execute static block, then statement block then constructor.

Workspace

NA
SHSTTON
16
Solv. Corr.
94
Solv. In. Corr.
110
Attempted
0 M:0 S
Avg. Time

40 / 64

What is the output for the below code?
public class Test {
public static void main(String[] args){                                                                                                                      int i = 010;
int j = 07;
System.out.println(i);
System.out.println(j);
}
}

A8 7

B10 7

CCompilation fails with an error at line 3

DCompilation fails with an error at line 5

Answer: Option A

Explanation:

By placing a zero in front of the number is an integer in octal form. 010 is in octal form so its value is 8.

Workspace

JAVA Programming Basic Concepts Questions and Answers pdf

At JAVA Programming topic Basic Concepts page No: 4 you will find list of 10 practice questions, tips/trick and shortcut to solve questions, solved questions, quiz, and download option to download the whole question along with solution as pdf format for offline practice. You can practice all the listed JAVA Programming Basic Concepts topic questions offline too, by downloading the MCQs practice question of Basic Concepts with detail solution, with formula/Tips & Tricks, with Solved examples and with top-rated users answers, which will give you best answer ascross webs. It is one of the perfect Basic Concepts e-book pdf covering all types of questions in detail. These JAVA Programming test with answers pdf cover all types of question asked in IIFT, XAT, SNAP, GRE, GMAT, NMAT, CMAT, MAT or for IT companies written exam like Wipro, HCL, Infosys, Accenture, Government exams, IBPS Exams etc. There are multiple formats to download your online free JAVA Programming Basic Concepts e-book, like fully solved, unsolved questions with Answers sheet. Even you can customize your ebook format by adjusting the given options in the download section to make it your one of the best JAVA Programming topic-based ebook. It is recommended to bookmark this page JAVA Programming Basic Concepts for your preparation. Most of the students and fresher candidates finding it hard to clear the JAVA Programming section in exams. Here Given Basic Concepts practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Basic Concepts. Each test has all the basics questions to advanced questions with answer and explanation for your clear understanding, you can download the test result as pdf for further reference.

At JAVA Programming topic Basic Concepts, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Basic Concepts, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Basic Concepts MCQs practice question, and one after solving all the question of the respective level, you can refer back your Basic Concepts quiz result any time or you can download it as pdf for reference.

JAVA Programming Basic Concepts Customize Online Mock Test

This is own type of mock test, where At this JAVA Programming Basic Concepts MCQs mock test section, you will able to attempt only the questions related to Basic Concepts, in that question will be a different level, important, and all the questions will be part of some of the mock tests across Q4interview FREE Mock test. You need to choose the topic as Basic Concepts, and click on Double click to generate your customize mock test. While attempting the mock test you need to choose any of the one options out of given option. It is recommended to go through the direction given along with each question, as these questions will be randomly and so that same direction will not be applicable across the entire test. Once you submit your mock test, the result will be generated for Basic Concepts Customize mock test, where your performance point points will be highlighted. Q4interview analysis every single point which helps you to improve your topic understanding and help you to know your type of mistakes and way to improve Basic Concepts questions, by providing the same type of practice questions from practice exercise. The best part of this Basic Concepts, all these mock tests listed here are free and you can take as Many time, as many you want. When you continue to give Basic Concepts Customize Online Mock Test here regularly, then you will understand how much you have developed your accuracy on a topic, after that you will be able to decide how much attention you need to focus on. Your continued practice will increase your confidence, speed and thinking ability intensely, the Basic Concepts Customize topic on which you will practice more will beneficial for you in future during campus placement.Basic Concepts Mock Tests

JAVA Programming Basic Concepts Quiz Online Test

The details of the JAVA Programming Basic Concepts quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about JAVA Programming Basic Concepts that you see and keep them in mind while answering questions.

JAVA Programming Basic Concepts MCQs Practice Questions with Answer

On this Basic Concepts section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve Basic Concepts Question Quickly. It contains all the JAVA Programming topic Basic Concepts questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on JAVA Programming topic and Basic Concepts topic based quiz.

JAVA Programming Basic Concepts solved examples question

Clarity of concepts is a must if you want to master the skill of solving JAVA Programming problems. This page contains sample JAVA Programming Basic Concepts questions and answers for freshers and competitive exams. Basic Concepts Questions with the detailed description, the explanation will help you to master the topic. Here solved examples with detailed answer description, explanations are given and it would be easy to understand. How to solve qBasic ConceptsJAVA Programming? Here are some examples solved with the Common Rules/tricks/tips of JAVA Programming. Enhance your chance to score maximum marks in JAVA Programming sections through. Error Spotting Grammar Questions Online Test for Free. Fully solved Sentence Formation MCQs questions with detailed answer description. JAVA Programming is an important topic for any exams but most aspirants find it difficult. You need to learn various tricks tips, rules, etc to solve quickly. At this page, you will find frequently asked Basic Concepts questions or problems with solutions, shortcuts, formulas for all-important competitive exams like IT companies exams, interviews. It is always a best practice to go through the example and understand the types of question and way to solve it, so let's do some examples to calculate efficiency, read through all the given here solved examples. You can post your solution, tips, trick and shortcut if you have any in respect to questions.

You can get here fully solved Basic Concepts examples with a detailed answer and description. You can solve Basic Concepts problems with solutions, the questions by companies wise by filtering the questions, additionally, you can check what type of questions are being asked in IT companies Written Round from Basic Concepts. Basic Concepts became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Basic Concepts Examples, Basic Concepts sample questions. You can Evaluate your level of preparation in Basic Concepts by Taking the Q4Interivew Basic Concepts Online Mock Test based on most important questions. All the Basic Concepts practice questions given here along with answers and explanations are absolutely free, you can take any number of time any mock Test.

Why JAVA Programming Basic Concepts?

In this practice section, you can practice JAVA Programming Questions based on "Basic Concepts" and improve your skills in order to face the interview, competitive examination, IT companies Written exam, and various other entrance tests (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get JAVA Programming Basic Concepts questions and answers with explanation?

Q4Interview provides you lots of fully solved JAVA Programming (Basic Concepts) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. You can download JAVA Programming Basic Concepts quiz questions with answers as PDF files and eBooks.

Where can I get JAVA Programming Basic Concepts Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type JAVA Programming Basic Concepts questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.