Logo Rumman Ansari
  • Home
  • Blog
  • Appointment
  • Courses
    Paid Courses
    • X++ Programming Language
    • D365 F&O Technical Using X++ Programming Language
    • Java Fundamentals: Building Strong Foundations
    • D365 F&O X++ Programming Language Interview Questions & MCQs
    • ICSE Computer Applications Class 10 – Previous Year Question Papers & Solutions
    • GH-300: GitHub Copilot
    • MB-330: Microsoft Certified: Dynamics 365 Supply Chain Management Functional Consultant Associate
    • Interview Mastery: The Complete Guide for Candidates and Interviewers
    • AB-730: Microsoft Certified: AI Business Professional
    • ISC COMPUTER SCIENCE Class XI
    • MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer
    • Authentication
    • Artificial intelligence
    • Complete MySQL Database Mastery Course: Beginner to Advanced with Real-World Projects
    • UGC NET, SET
    • HTML5 Fundamentals: Build Websites from Scratch
    • Prompt Engineering
    • Mastering HTML: From Fundamentals to Advanced Concepts
    • Mastering JavaScript: From Fundamentals to Advanced Concepts
    • Art of Delegation
    • Computer Science - 10 Years Solved Papers ISC Class XII
    • IT Career Mastery Blueprint
    • The Practical Tech Creator Blueprint
    • Leadership Communication for Agile and IT Delivery Teams
    Free Courses
    • AB-100: Agentic AI Business Solutions Architect
    • AJAX
    • AngularJS
    • Arithmetic Aptitude
    • 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
    • Complete Data Structures Mastery Course: Beginner to Advanced with Real-World Examples
    • Computer Awareness
    • Computer Awareness & Fundamentals: Complete Guide
    • Computer Network
    • Computer Science and Engineering
    • Continuous Deployment
    • Continuous Integration
    • CSS
    • Current Affairs
    • Database Management System
    • Digital Logic
    • Digital Productivity & Computer Awareness
    • Education
    • Electrical Engineering
    • English
    • English Grammar
    • General Aptitude
    • Geography
    • History
    • ICSE Class 8 Computer Studies (Latest CISCE Syllabus)
    • Important Days and Dates
    • Islam
    • Java Programming Language
    • JavaScript
    • Leadership Behavior, Culture, and Communication for Team Leads
    • Logical Fallacy
    • Machine Learning
    • Mathematics
    • Mathematics for Programming
    • Mathematics in Bangla - Class 5
    • MB-310: Microsoft Certified: Dynamics 365 Finance 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
    • Microsoft Power Platform Mastery (Power BI + Power Apps + Power Automate + Copilot + Dataverse)
    • Mindwork games
    • Miscellaneous Topics
    • Misconceptions about Islam
    • Neural Networks and Deep Learning
    • NPM - Package Manager
    • Pakistan Geography
    • Photoshop
    • PHP
    • Programming Language
    • Puzzles
    • Python Programming Language
    • R Programming Language
    • ReactJS
    • Science
    • Scrum Master Complete Bootcamp: From Beginner to Professional
    • Social Science
    • SQL
    • SQLite
    • System Design
    • Tamil Nadu State board (Class 10)
    • Technical MCQs
    • Technical Short Answers
    • TypeScript - JavaScript's Superset
    • User Experience
    • Verbal and Reasoning
    • Vue JS
    • WB Gram Panchayat Exam Complete Preparation Course - পশ্চিমবঙ্গ গ্রাম পঞ্চায়েত সম্পূর্ণ প্রস্তুতি কোর্স
    • অতীত ও ঐতিহ্য: অষ্টম শ্রেণীর: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • অর্থনীতি
    • আরবী ভাষা কোর্স - Diploma in Arabic language
    • ইতিহাস
    • ইতিহাস ও পরিবেশ: দশম শ্রেণি: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • ইসলামিক বই
    • ইসলামে আকীকা
    • ইসলামে নারী
    • এসো আরবী শিখি
    • কুরআন
    • খাদ্য, পুষ্টি ও খাদ্যের উপাদান
    • জীবনবিজ্ঞান ও পরিবেশ (দশম)
    • তাহারাত কুইজ প্রতিযোগিতা
    • নবীদের কাহিনী - The story of the prophets
    • পরিবেশ ও বিজ্ঞান
    • পশ্চিমবঙ্গ মধ্যশিক্ষা / উচ্চ মাধ্যমিক শিক্ষা সংসদ: বই PDF
    • প্যারেন্টিং - Parenting
    • প্রচলিত ভুল বিষয়ে প্রতিযোগিতা টেস্ট কুইজ
    • প্রশ্নোত্তরে ইসলামী জ্ঞান
    • বাংলা ইসলামিক কুইজ - Bangla Islamic Quiz
    • বাংলা সাহিত্য
    • ব্যক্তিগত উন্নয়ন (Personal Development)
    • ভূগোল
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন ও কম্পিউটার বিজ্ঞান - একাদশ শ্রেণী (Class 11) - WBCHSE
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন ও কম্পিউটার বিজ্ঞান - দ্বাদশ শ্রেণী (Class 12) - WBCHSE
    • লেখক এবং কবি
    • শয়তান পরিচিতি
    • সংক্ষিপ্ত জীবনী
    • সাধারণ জ্ঞান
    • সাহাবীদের জীবনী
    • সীরাত প্রতিযোগিতার প্রশ্ন ও উত্তরসমূহ
  • Login
    • Login with Email
Home› Java Programming Language› ICSE Computer Application - Class - X› Create a class with one integer instance variable. Ini…
✏️ Explanatory Question

Create a class with one integer instance variable. Initialize the variable using:

  1. default constructor
  2. parameterized constructor

👁 114 Views
📘 Detailed Answer
🟢 Easy
← Previous Name the type of error (syntax, runtime or logical error) in each case given below: Division by a variable that contains a value of zero. Multiplication operator used when the operation should be division. Missing semicolon. Next → Complete the code below to create an object of Scanner class: Scanner sc = ____ Scanner(__________);
💡

Answer with Explanation


class Number {
    int a;

    public Number() {
        a = 0;
    }

    public Number(int x) {
        a = x;
    }
}
← Previous Name the type of error (syntax, runtime or logical error) in each case given below: Division by a variable that contains a value of zero. Multiplication operator used when the operation should be division. Missing semicolon. Next → Complete the code below to create an object of Scanner class: Scanner sc = ____ Scanner(__________);
📌 Topic Information
Subject Java Programming Language
Chapter ICSE Computer Application - Class - X
Sub-Chapter ICSE Computer Application - Class X - 2012 PYQ
Published 07 Sep 2024

Related Questions

More questions from the same topic.
1
Give one example each of a primitive data type and a composite data type.
2
Give one point of difference between unary and binary operators.
3
Differentiate between call by value or pass by value and call by reference or pass by reference. Java Language
4
Write a Java expression for √(2as + u²).
5
Name the type of error (syntax, runtime or logical error) in each case given below: Division by a variable that contains a value of zero. Multiplication operator used when the operation should be division. Missing semicolon.
6
Complete the code below to create an object of Scanner class: Scanner sc = ____ Scanner(__________);
7
What is an array? Write a statement to declare an integer array of 10 elements.
8
Name the search or sort algorithm that: Makes several passes through the array, selecting the next smallest item in the array each time and placing it where it belongs in the array. At each stage, compares the sought key value with the key value of the middle element of the array.
9
Differentiate between public and private modifiers for members of a class.
10
What are the values of x and y when the following statements are executed? int a = 63, b = 36; boolean x = (a > b)? true : false; int y = (a < b)? a : b;

About Rumman

Learn. Grow. Succeed. Explore courses, articles, videos, GK, blogs, and more.

Quick Links

  • Home
  • Blog
  • Topic
  • Courses

Courses

  • Free Courses
  • Paid Courses

Connect with Us

© 2026 RummanAnsari. All rights reserved.

About Privacy Terms