Access free live classes and tests on the app
Download
+
Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA
Login Join for Free
avtar
  • ProfileProfile
  • Settings Settings
  • Refer your friendsRefer your friends
  • Sign outSign out
  • Terms & conditions
  • •
  • Privacy policy
  • About
  • •
  • Careers
  • •
  • Blog

© 2023 Sorting Hat Technologies Pvt Ltd

Watch Free Classes
    • GATE 2024
    • GATE 2024 Question Papers
    • GATE Notes by Jaspal Singh
    • GATE Notes by S K Mondal
    • Downloads
    • GATE 2024 Rank Predictor
    • Notifications
    • MCQs
    • Question Bank
    • Video Lectures
    • Study Materials
    • PSU Recruitment
    • Difference Between
    • Full Forms
    • Exam Tips
    • GATE Books
GATE 2026 Exam Date Announced – Complete Schedule, Syllabus, and Key Details » GATE MCQs » MCQs on Java

MCQs on Java

Java is a general purpose programming language that is high-level and also an object oriented programming language that is mainly designed to have as few implementation dependencies as possible.

Table of Content
  •  

One of the top developing platforms for an organization’s choice that looks forward in tackling today’s business needs is none other than Java. It is mainly used for building a wide range of applications for a wide variety of platforms. Day to day uses of Java could be in- cell phones, desktops, servers, blu-ray players, web browsers and also in televisions. C and C++ a few similar syntaxes of Java . However, its facilities are fewer and lower in quality in either of them. It was however developed by the Oracle Corporation. James Gosling further designed it at Sun Microsystems. It first appeared 26 years ago on 23 May, 1995. Its typing discipline could be defined as strong, safe, manifest, nominative, etc. 

The latest version is Java 18 as of March 2022. Its long term support versions are as follows- Java 17, 11 and 8. The one used for commercial use is Java 8 LTS that was released in January 2019. For one’s individual use, however, Java 8 provided with public updates is being supported. Four editions of Java are being supported that have been defined by Sun with different targeting application environments. The different platforms are- Java Platform, Micro Edition (Java ME) with limited resources, Java SE (Standard Edition) for workstation environments, etc. The extension for code files of Java is .java. Any files in particular to Java will show up this code or extension.  To store a path to the installation of Java, JAVA_HOME is used. Pointers on the other hand are not a feature of Java. Some features of Java programming are as follows- Architectural neutral, robust, secure, etc. Keyword though cannot be used as a variable for Java. These are special reserved words that we cannot use to name a user-defined variable. Lastly, Truncation in Java is the floating point value assigned to a floating type. Hence, Java is a platform independent language that is mainly designed to have as a few implementation dependencies as possible. 

Multiple Choice Questions (MCQ’s)

  • In Java, what is the number of primitive data types?
  • 4
  • 6
  • 8

    Answer- There are eight fundamental data types: int type, char type, boolean type, byte type, long type, float type, short type, and double type.

  • Float and Double sizes in Java are?
  • 32 and 32
  • 32 and 64
  • 64 and 64

Answer – The size is 32 and 64.

  • In which case is the automatic type conversion possible?
  • Int to long
  • Long to Int
  • Byte to Int

    Answer- It is possible in Int to long.

  • Which one is the syntax of Java?
  • C++
  • C
  • All of the above

   Answer- Both C and C++ are used as syntax in Java.

  • Who developed Java?
  • Gennady Korotkevich
  • John Carmack
  • Oracle Corporation 

    Answer- Java was developed by Oracle Corporation. 

  • Who designed Java?
  • James Gosling
  • Linus Torvalds
  • Alan Turing

    Answer- James Gosling designed it.

  • How many years back Java appeared?
  • 10
  • 18
  • 26

 Answer- 26 years ago, Java first appeared. 

  • Which is the first year when Java came into view?
  •  23 May, 1995
  •    9 April, 2001
  •  13 August, 2007

Answer- Java first came into view in the year 1995 in 23 May.

  • Choose one of its typing disciplines. 
  • Strong
  • Weak
  • Intermediate 

 Answer- Strong could be defined as one of its typing disciplines.

  • Which is the latest version of Java?
  • Java 17
  • Java 11
  • Java 18

  Answer- The latest version of Java is Java 18.

  •  The long-term support versions of Java- 
  • Java 18
  • Java 17
  • Java 8 LTS

 Answer- Java 17 is the long-term support version of Java.

  • Which version of Java is used for commercial use?
  • Java 11
  • Java 17
  • Java 8 LTS

Answer- Java 8 LTS that had been released in January 2019 is used for commercial purpose.

  • How many Editions of Java are being supported?
  • Three 
  • Two
  • Four

 Answer- Four editions of Java are being supported. 

  • Which platform of Java is being used as limited resources?
  • Java ME
  • Java SE
  • Java 11

Answer-  Java ME is being used as limited resources. 

  • Which statement is true for Java?
  • It is a code dependent programming language 
  • It is a platform dependent programming language 
  • It is a platform independent programming language 

 Answer- Java is a platform independent language that is mainly designed to have as few implementation dependencies as possible.

  • Mention the one which is not a feature of Java.
  • Use of pointers
  • Portable
  • Object oriented

 Answer- pointers is not a feature of Java. Some features of Java programming are- Architectural neutral, Robust, Secure, etc.

  • A variable name that cannot be used for Java.
  • Keyword 
  • Identifier and Keyword 
  • None of the above

 Answer-  Keyword cannot be used as a variable for Java. These are special reserved words that we cannot use to name a user-defined variable. 

  • The extension of Java code file is?
  • .txt
  • .js
  • .java

 Answer- .java is the file extension code of Java.

  • The environment variable used to set the java path is?
  • JAVA_HOME
  • MAVEN_Path
  • JAVA

 Answer- To store a path to the installation of Java, JAVA_HOME is used.

  • Truncation in Java is?
  • Integer Value assigned to Floating type
  • Floating point value assigned to an integer type
  • Floating point value assigned to a Floating type

  Answer- Floating point value assigned to a Floating type.

Important Links:

GATE CSE Preparation Strategy

How to Prepare for GATE CSE

GATE Previous Year Question Papers With Solutions for ECE PDF Free Download

Best GATE Preparation Books for ECE

How to Prepare for GATE Exam Without Coaching

GATE Rank Predictor

Crack GATE with Unacademy

Get subscription and access unlimited live and recorded courses from India’s best educators

  • Structured syllabus
  • Daily live classes
  • Ask doubts
  • Tests & practice
Learn more

Notifications

Get all the important information related to the GATE Exam including the process of application, important calendar dates, eligibility criteria, exam centers etc.

Complete Guide to GATE 2025 Syllabus for CSE with Subject-wise Weightage – Quick Guide
GATE 2012 Questions with Answers
GATE 2013 Question with Answers
GATE 2014 Question with Answers
GATE 2015 Questions with Answers
GATE 2016 Questions with Answers
GATE 2017 Questions with Answers
GATE 2018 Questions with Answers
GATE 2019 Questions with Answers
GATE 2020 Question Paper with Answer: Download PDFs
GATE 2021 Questions with Answers
GATE 2022 Rankers Summit
GATE 2023 Admit Card – Release Date, How to Download & Direct Link
GATE 2023 Exam Dates
GATE 2024 Registration – Application Form at gate2024.iisc.ac.in
GATE 2026 Detailed Paper Analysis & Solution
GATE CS & IT Engineering Previous Year Questions with Answers
GATE Cutoff 2023 – Brach-wise and Category-wise cut-off
GATE Electrical Engineering Previous Year Questions with Answers
GATE Electronics and Communication Engineering (ECE) Previous Year Questions with Answers
GATE Eligibility Criteria 2026: Age Restrictions, Qualifications, and Applicants
GATE Exam Calendar 2023
GATE Exam Pattern 2023 – New Test Structure, Paper Pattern, Marking Scheme for all papers
GATE Mechanical Engineering Previous Year Questions with Answers
GATE Previous Year Question Papers with Solution – Download PDFs
GATE Previous Year Question Papers with Solutions for Civil Engineering
GATE Result 2023 Out – Steps to check GATE Result
GATE Syllabus 2026: Download GATE Syllabus PDF
See all

Related articles

Learn more topics related to GATE MCQs
Python MCQs

Python is a programming language, basically a very high-level and a general-purpose language. The design is such that it lays emphasis on code readability with the use of significant indentation. The language used in python helps construct an object-oriented approach with the aim to help the programmers write clear and logical codes for small and large-scale products.

Organisational Behaviour

The below articles contains MCQs on Organisational Behaviour. These questions involves the types of questions that are frequently asked in the examination.

Operating System MCQs

This article will discuss important points about operating systems and will as mention multiple choice questions on operating systems. The article will further explain the answers to each question in brief. Further questions related to various sections under the operating system are covered throughout the article.

Mobile Computing

MCQs on " Mobile Computing": Find the multiple choice questions on " Mobile Computing", frequently asked for all competitive examinations.

See all
Access more than

10,997+ courses for GATE & ESE

Get subscription

Trending Topics

  • Comprehensive Guide for GATE Data Science
  • GATE PYQs Test Series (DS & AI Engineering)
  • GATE DS & AI UA Lite – 2026
  • Unacademy Subscription – GATE CSIT, DSAI & Interview Preparation
  • Foundation Batch for GATE & PSUs 2028 – DSAI 4.0
  • GATE Preparation Books

Related Links

  • Abhyaas : Practice Program Batch for GATE & ESE 2026 – CE
  • Starters Kit for GATE 2027 & 2028 – CE
  • Abhyaas : Practice Batch for GATE, ESE & PSUs 2026 – ME
  • Course On Measurements & Instrumentation
  • Starters Kit for GATE 2027 & 2028 – EC
  • Distance Learning Program for GATE – ECE 2025
  • Aasha : Batch for WBSEDCL JE Gr-II 2025
  • GATE Civil Engineering Syllabus 2026
  • GATE Exam Syllabus For Mechanical Engineering
  • Best GATE Preparation Books for ECE
  • How to Prepare for GATE CS & IT
  • GATE Preparation
Download previous years papers
.
Company Logo

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585

Company
About usShikshodayaCareers
we're hiring
BlogsPrivacy PolicyTerms and Conditions
Help & support
User GuidelinesSite MapRefund PolicyTakedown PolicyGrievance Redressal
Products
Learner appLearner appEducator appEducator appParent appParent app
Popular goals
IIT JEEUPSCSSCCSIR UGC NETNEET UG
Trending exams
GATECATCANTA UGC NETBank Exams
Study material
UPSC Study MaterialNEET UG Study MaterialCA Foundation Study MaterialJEE Study MaterialSSC Study Material

© 2026 Sorting Hat Technologies Pvt Ltd

Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA

Share via

COPY