Smart Content Search

Find the exact content you need

Search across courses, articles, programs, MCQs, and descriptive questions from your knowledge platform in one clean workspace.

2155

Results Found

101

Current Page

108

Total Pages

Showing 2155 result(s) for your search.

java
Question Result 2001

Describe the two fundamental types of stream classes in Java and their specific use cases for I/O operations.

Java Fundamentals: Building Strong Foundations File Operations Java File Operations Java
The two types of stream classes are Byte stream classes and Character stream classes, both located in the java.io package. Byte stream classes are used for Byte oriented I/O, which is suitable for machine-readable binary files. Character stream classes are use...
View Details
/question/9017
Question Result 2002

Differentiate between call by value or pass by value and call by reference or pass by reference. Java Language

Java Programming Language ICSE Computer Application - Class - X ICSE Computer Application - Class X - 2012 PYQ
Call by value Call by reference Values of actual parameters are copied to formal parameters. Reference of actual parameters is passed to formal parameters. Changes made to formal parameters are not reflected back to actual parameters. Changes made to formal pa...
View Details
/question/7715
Question Result 2003

Differentiate between public and private modifiers for members of a class.

Java Programming Language ICSE Computer Application - Class - X ICSE Computer Application - Class X - 2012 PYQ
Here’s a comparison between the public and private access modifiers in the context of class members in Java: Aspect Public Modifier Private Modifier Accessibility Members declared as public can be accessed from anywhere in the program, including other classes ...
View Details
/question/7722
Question Result 2004

Differentiate between String and StringBuffer objects.

Java Programming Language Java Library Classes and Packages Java Library Classes and Packages
The string objects of Java are immutable. If any change occurs in a string object, the original string remains unchanged and a new string is created with the changed string. StringBuffer objects are mutable, meaning these objects can be manipulated and modifie...
View Details
/question/8924
Question Result 2005

Differentiate between the Printable and Pageable rendering models in the Java Printing API.

Java Fundamentals: Building Strong Foundations File Operations Java File Operations Java
The Printable model is the simpler of the two, using a single PagePainter to render the entire document in sequence. The Pageable model offers more flexibility, allowing each page to have a different layout, format, or even its own painter. This makes Pageable...
View Details
/question/9025
Question Result 2006

Distinguish between Java and Python.

Python Programming Language Fundamentals of Python Important Points about Python
Java and Python can be distinguished on the following bases: 1. Python programs run slower than Java codes, but Python saves much time and space. Python programs are 3 to 5 times smaller than Java programs. 2. Python is a loosely-typed dynamic language because...
View Details
/question/2025
Question Result 2007

Does Java allow Default Arguments?

Java Programming Language Class, Object and Methods in java About Java Tutorial
No, Java does not support default arguments in the same way some other programming languages do, like Python or C++. In Java, every parameter of a method must be explicitly specified in the method signature, and when you call a method, you must provide values ...
View Details
/question/203
Question Result 2008

Example of Array Declaration in Different Data Types

Java Programming Language Array in java Array in java
Integer Array: int[] intArray = new int[10]; // Array of 10 integers String Array: String[] strArray = {"Java", "Python", "C++"}; // Array of 3 strings Double Array: double[] dblArray = new double[4]; // Array of 4 double elements Float Array: float[] floatArr...
View Details
/question/7734
Question Result 2009

Example: IOException

Java Programming Language Managing Errors and Exception Introduction to Exception Handling - Java
import java.io.FileReader; import java.io.IOException; public class CheckedExample { public static void main(String[] args) { try { FileReader file = new FileReader("non_existing_file.txt"); file.read(); file.close(); } catch (IOException e) { System.out.print...
View Details
/question/8583
Question Result 2010

Example: OutOfMemoryError

Java Programming Language Managing Errors and Exception Introduction to Exception Handling - Java
import java.util.ArrayList; public class ErrorExample2 { public static void main(String[] args) { ArrayList list = new ArrayList(); while (true) { list.add(new int[1000000]); // Keep allocating memory } } }
View Details
/question/8589
Question Result 2013

Give the output of the following code: String A ="26", B="100"; String D=A+B+"200"; int x= Integer.parseInt(A); int y = Integer.parseInt(B); int d = x+y; System.out.println("Result 1 = " + D); System.out.println("Result 2 = " + d);

Java Programming Language ICSE Computer Application - Class - X ICSE Computer Application - Class X - 2017 PYQ
Output of the above code is: Result 1 = 26100200 Result 2 = 126 Explanation As A and B are strings so String D=A+B+"200"; joins A, B and "200" storing the string "26100200" in D. Integer.parseInt() converts strings A and B into their respective numeric values....
View Details
/question/7832
Question Result 2014

How are compile-time errors different from run-time errors?

Java Programming Language Managing Errors and Exception Introduction to Exception Handling - Java
Basis Compile-time Errors Run-time Errors When they occur During program compilation During program execution Detected by Compiler Java Virtual Machine (JVM) Examples Missing semicolon, undeclared variable Division by zero, invalid array index
View Details
/question/8612
Question Result 2017

How does the MVC architecture work in AngularJS?

AngularJS - JavaScript framework AngularJS Tutorial MVC architecture
How does the MVC architecture work in AngularJS? AngularJS uses the Model-View-Controller (MVC) architecture pattern to separate the application logic into different components. The Model represents the data or state of the application, and it is responsible f...
View Details
/question/1054
Question Result 2018

How is X++ different from other programming languages?

X++ Programming Language Fundamentals of X++ Language About X++ tutorial
X++ is different from other programming languages in several ways: Purpose: X++ is specifically designed for the Microsoft Dynamics AX platform, it's the primary language for developing applications that run on top of the Dynamics AX framework, while other pro...
View Details
/question/978
Question Result 2019

How Java enabled High Performance?

Java Programming Language Java Programming Language Java Features
Java uses Just-In-Time compiler to enable high performance. Just-In-Time compiler is a program that turns Java bytecode, which is a program that contains instructions that must be interpreted into instructions that can be sent directly to the processor. Java p...
View Details
/question/56
Question Result 2020

How Java Handles Exceptions

Java Programming Language Managing Errors and Exception Introduction to Exception Handling - Java
Java uses a mechanism called Exception Handling with these keywords: Keyword Purpose try Defines a block of code to test for errors catch Defines a block of code to handle the error finally Always executes (cleanup code) throw Used to throw an exception manual...
View Details
/question/8581