rummanansari Template
  • Home
  • Blog
    • Blog - HOME
    •   Technical
    • Search Engine Optimization
    • Data Structure
    • Image Processing
    • C Programming
    • .NET
    • SQL Server
    • TCS Preparation
    • Miscellaneous
    •   Non Technical
    • Top 10
    • Life Lesson
    •   Quotes
    • English Quotes
    • Bangla Quotes
    • Bangla to English Translations
    • Bangla Kobita
    • Bangla Whatsapp Story
  • Topics
    • GK - HOME
    • Basic GK
    • General Science
    • Honours and Awards
    • Inventions
    • World Organisations
    • Important Days
    • World Geography
    • Indian Geography
    • Indian History
    • Computer Awareness
    • MS excel, office etc.
    • Problems on Train
    • more...
  • Course
    • Library Home
    • AJAX
    • AngularJS
    • Arithmetic Aptitude
    • Artificial intelligence
    • Automata Theory
    • AZ-400: Designing and Implementing Microsoft DevOps Solutions
    • Azure DevOps for Beginners
    • Bangla to English
    • Biography
    • Biology
    • Bootstrap 4
    • C Programming Language
    • C Programming Language Video Bangla
    • C# Programming Language
    • C++ language
    • Competitive Exam
    • Computer Awareness Video
    • Computer Fundamentals
    • Computer Network
    • Computer Science and Engineering
    • Continuous Deployment
    • Continuous Integration
    • CSS
    • Current Affairs
    • Data Structure
    • Database Management System
    • Digital Logic
    • Education
    • Electrical Engineering
    • English
    • English Grammar
    • General Aptitude
    • Geography
    • History
    • HTML 5
    • Important Days and Dates
    • Interview Questions
    • ISC - COMPUTER SCIENCE - XI
    • Islam
    • Java Programming Language
    • JavaScript
    • Leadership behavior and Culture
    • Logical Fallacy
    • Machine Learning
    • Mastering HTML: From Fundamentals to Advanced Concepts
    • Mastering JavaScript: From Fundamentals to Advanced Concepts
    • Mathematics
    • Mathematics for Programming
    • Mathematics in Bangla - Class 5
    • MB-310: Microsoft Certified: Dynamics 365 Finance Functional Consultant Associate
    • MB-330: Microsoft Certified: Dynamics 365 Supply Chain Management Functional Consultant Associate
    • MB-700: Microsoft Dynamics 365: Finance and Operations Apps Solution Architect
    • MB-920: Microsoft Dynamics 365 Fundamentals (ERP)
    • Microservices Architecture
    • Microsoft Azure
    • Microsoft Excel - Bangla
    • Mindwork games
    • Miscellaneous Topics
    • Misconceptions about Islam
    • MySQL
    • Neural Networks and Deep Learning
    • NPM - Package Manager
    • Pakistan Geography
    • Photoshop
    • PHP
    • Programming Language
    • Prompt Engineering
    • Puzzles
    • Python
    • R Programming Language
    • ReactJS
    • Science
    • Social Science
    • SQL
    • SQLite
    • Tamil Nadu State board (Class 10)
    • Technical MCQs
    • Technical Short Answers
    • TypeScript - JavaScript's Superset
    • UGC NET, SET
    • User Experience
    • Verbal and Reasoning
    • Vue JS
    • অতীত ও ঐতিহ্য: অষ্টম শ্রেণীর: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • অর্থনীতি
    • আরবী ভাষা কোর্স - Diploma in Arabic language
    • ইতিহাস
    • ইতিহাস ও পরিবেশ: দশম শ্রেণি: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • ইসলামিক বই
    • ইসলামে আকীকা
    • ইসলামে নারী
    • এসো আরবী শিখি
    • কুরআন
    • জীবনবিজ্ঞান ও পরিবেশ (দশম)
    • তাহারাত কুইজ প্রতিযোগিতা
    • নবীদের কাহিনী - The story of the prophets
    • পরিবেশ ও বিজ্ঞান
    • প্যারেন্টিং - Parenting
    • প্রচলিত ভুল বিষয়ে প্রতিযোগিতা টেস্ট কুইজ
    • প্রশ্নোত্তরে ইসলামী জ্ঞান
    • বাংলা ইসলামিক কুইজ - Bangla Islamic Quiz
    • বাংলা সাহিত্য
    • ব্যক্তিগত উন্নয়ন (Personal Development)
    • ভূগোল
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন - একাদশ শ্রেণী
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন - দ্বাদশ শ্রেণী
    • লেখক এবং কবি
    • শয়তান পরিচিতি
    • সংক্ষিপ্ত জীবনী
    • সাধারণ জ্ঞান
    • সাহাবীদের জীবনী
    • সীরাত প্রতিযোগিতার প্রশ্ন ও উত্তরসমূহ
  • Paid Courses
    • Library Home
    • X++ Programming Language
    • X++ Programming Fundamentals - D365 F&O Technical
    • D365 F&O MCQ Questions - X++ Programming Language MCQ
    • ICSE Computer Applications Class 10 – Previous Year Question Papers & Solutions
    • GH-300: GitHub Copilot
    • Java Fundamentals: Building Strong Foundations
    • MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer
    • Authentication
    • Digital Productivity
  •  Login
    • Login - Dashboard
    • Login - Here
    • About Our Team
    • Privacy Policy
    • Terms and Conditions
    • Cancellation and Refund Policy
    • Shipping and Delivery Policy
    • Guest Post Rule
    • Contact Us
Menu

Login and Register

Go to Dashboard Logged In Successfully!


Check your Email for the OTP


  • Login
  • Registration
  • Forget Password



Java Data Types and Variables - MCQ - Quiz

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

The smallest integer type is___________ and its size is___________bits.

  • Ashort, 8
  • Bbyte, 8
  • Cshort, 16
  • Dshort, 16

What is the output of the following program?
public class Test{
	static int x  = 10 ;
       	public static void main(String[] a){
		 Test test = new Test( ) ; 
		 Test test1 = new Test( ) ;
		 test.x  +=  1 ;
		 System.out.println(  test.x + test1.x ) ;    
	}
}

  • A20
  • B21
  • C22
  • DCompilation Error

What will be the output for the below code ?
1. public class Test{
2.       public static void main(String[] args){
3.             byte i = 128;
4.             System.out.println(i);
5.       }
6. }

  • A128
  • C Compilation fails with an error at line 3
  • DNone of these

Which of the following is not a primitive data type?

  • Aint
  • Bshort
  • Cbyte
  • Denum

Byte variables are declared by use of the ____________ keyword (Using Primitive Data Type).

  • ABytes
  • Bbyte
  • CByte
  • Dbytes

Range of Byte Data Type is ____________.

  • A-128 to 256
  • B-127 to 128
  • C-128 to 255
  • D-128 to 127

Default value of variable having boolean data type is ___________.

  • A1
  • Btrue
  • Dfalse

Default value of character data type in Java Programming is ___________________.

  • A'\u0000'
  • Bundefine
  • Cnull

Default value of String (or any object) in Java Programming is _____________.

  • Bfalse
  • C'\u0000'
  • Dnull

Which of the following data type is not considered as data type in Java Programming.

  • Achar
  • Bboolean
  • CString
  • Dint
Results:
🟢 Correct Answers:   🔴 Wrong Answers:

💹 View Detailed Quiz Results

🛫 Take Another Quiz
Login to save results
Quiz Information
Quiz Information

Quiz Platform FAQ

General Information

  • Number of Questions: Each quiz consists of 10 questions.
  • Time Limit: You have 30 seconds per question. The total time to complete the quiz is 5 minutes.
  • Multiple Attempts: You can take the quiz multiple times to improve your score.

Results and Feedback

  • Result Analysis: After completing the quiz, you will see a results page with the following details:
    • Correct Option for each question.
    • Your Selected Option for each question.
    • Explanation for each answer to help you understand why it is correct or incorrect.
    • Percentage of Correct Answers to show your overall performance.
  • Interactive Features: The platform provides feedback on each attempt to help you learn and improve.

Important Instructions

  • Do Not Refresh: Do not refresh the page while taking the quiz. Refreshing the page will end the current quiz and a new quiz will start.
  • Saving Your Quiz: To save your quiz progress and questions, log in to your account. Once logged in, you can view saved quizzes in your profile section.
  • Mandatory Selection: All questions are mandatory to select. If you do not select all 10 questions, you will not be able to submit the quiz. Once all questions are selected, you will be able to see the Submit button. If you wait until the end of the time, the quiz will be auto-submitted by the system, and you will be able to see your results.

Tips for Taking the Quiz

  • Manage Your Time: Keep track of the time for each question to ensure you have enough time to answer all 10 questions.
  • Review Explanations: After the quiz, read the explanations provided for each answer to enhance your understanding of the material.
  • Retake the Quiz: If desired, take the quiz again to improve your score and reinforce your learning.
  • Avoid Refreshing: To prevent losing progress, avoid refreshing the page during the quiz.
  • Log In to Save: If you want to save your quiz progress, log in to your account and check your profile section for saved quizzes.
Quiz Analytics

Java Data Types and Variables - MCQ - Quiz

Guest User clock Time Taken:
Questions: Answered: Not Answered:
rightCorrect Answer: wrongWrong Answer: percentage smallPercentage: %

Q: The smallest integer type is___________ and its size is___________bits.

  • A. short, 8
  • B. byte, 8
  • C. short, 16
  • D. short, 16
Correct Option: B
Remarks:

Explanation: byte, 8

Q: What is the output of the following program?

public class Test{
	static int x  = 10 ;
       	public static void main(String[] a){
		 Test test = new Test( ) ; 
		 Test test1 = new Test( ) ;
		 test.x  +=  1 ;
		 System.out.println(  test.x + test1.x ) ;    
	}
}

  • A. 20
  • B. 21
  • C. 22
  • D. Compilation Error
Correct Option: C
Remarks:

Explanation: 22

Q: What will be the output for the below code ?

1. public class Test{
2.       public static void main(String[] args){
3.             byte i = 128;
4.             System.out.println(i);
5.       }
6. }

  • A. 128
  • C. Compilation fails with an error at line 3
  • D. None of these
Correct Option: C
Remarks:

Explanation: Compilation fails with an error at line 3

Q: Which of the following is not a primitive data type?

  • A. int
  • B. short
  • C. byte
  • D. enum
Correct Option: D
Remarks:

Explanation: enum

Q: Byte variables are declared by use of the ____________ keyword (Using Primitive Data Type).

  • A. Bytes
  • B. byte
  • C. Byte
  • D. bytes
Correct Option: B
Remarks:

Explanation: byte

Q: Range of Byte Data Type is ____________.

  • A. -128 to 256
  • B. -127 to 128
  • C. -128 to 255
  • D. -128 to 127
Correct Option: D
Remarks:

Explanation: -128 to 127

Q: Default value of variable having boolean data type is ___________.

  • A. 1
  • B. true
  • D. false
Correct Option: D
Remarks:

Explanation: false

Q: Default value of character data type in Java Programming is ___________________.

  • A. '\u0000'
  • B. undefine
  • C. null
Correct Option: A
Remarks:

Explanation: '\u0000'

Q: Default value of String (or any object) in Java Programming is _____________.

  • B. false
  • C. '\u0000'
  • D. null
Correct Option: D
Remarks:

Explanation: null

Q: Which of the following data type is not considered as data type in Java Programming.

  • A. char
  • B. boolean
  • C. String
  • D. int
Correct Option: C
Remarks:

Explanation: The String class is not technically a primitive data type, but considering the special support given to it by the language,

Useful Links

  • Home
  • About us
  • Terms of service
  • Guest Post
  • Advertisement

Login

  • login
  • Sign Up

Visit All Home

  • Syllabus
  • Subject
  • Library
  • GK/MCQ
  • Blog

Social Links

  • Join Whatsapp Group
  • Join Telegram Group
© Copyright rummanansari. All Rights Reserved
Designed by rummanansari.com

You have unsaved changes or are in the middle of a quiz. If you leave, your progress might be lost. Select option for all questions.