answersLogoWhite

0

📱

Java Programming

The Java programming language was released in 1995 as a core component of the Java platform of Sun Microsystems. It is a general-purpose, class-based, object-oriented language that is widely used in application software and web applications.

5,203 Questions

What is the significance of the keyword "h2g2" in the context of Douglas Adams' works?

The keyword "h2g2" is significant in Douglas Adams' works as it refers to "The Hitchhiker's Guide to the Galaxy," a fictional guidebook in his science fiction series. It serves as a central element in the story, providing humorous and insightful information about the universe.

What is the significance of the keyword "erlknig" in the context of literary interpretation?

The keyword "erlknig" holds significance in literary interpretation as it refers to a supernatural being from German folklore, often associated with death or the supernatural realm. In literature, it is commonly used to symbolize themes of danger, mortality, and the unknown.

What is the significance of the keyword "Elizabeth Bishop" in the poem "The Shampoo"?

The keyword "Elizabeth Bishop" in the poem "The Shampoo" signifies the poet's admiration and respect for the renowned poet Elizabeth Bishop, whose work and influence are reflected in the themes and style of the poem.

What is the significance of the hand that mocked them and the heart that fed in the context of the keyword?

The hand that mocked them and the heart that fed represent the duality of human nature in the context of the keyword. It symbolizes how people can both show cruelty and kindness, reflecting the complexity of human behavior and emotions.

Can you provide a more detailed quote for the keyword "innovation"?

Here is a more detailed quote about innovation: "Innovation is the process of introducing new ideas, methods, or products that bring about positive change and improvement in various aspects of society, business, or technology. It involves creativity, problem-solving, and a willingness to challenge the status quo in order to drive progress and growth."

How do you Demorganize a Boolean expression?

The simplest way to describe this action is to demonstrate using a simple truth table. This is not intended to be an in depth study of the theorms but a simple demonstration of how a trivial equation can be demorganized. Given a simple boolean equation !A+!B=1. One could show in a truth table. !A !B !A+!B (fully inhibited OR function)

0 0 1

0 1 1

1 0 1

1 1 0 Demorganizing (hypersimplified method)

1) NOT all variables

2) NOT the equation

3) Invert the function (AND to OR or OR to AND)

Iterative steps yeilds

!A becomes !!A which is the same as A

(!!A + !B) = (A+!B)

!B becomes !!B which is the same as B

(A +!!B) = A+B OR function becomes AND

(A+B) = (AB)

NOT the full equation !(AB) = !A+!B Truth table for the new equation (which happens to be a NAND function) A B AB !AB !A+!B

0 0 0 1 1

0 1 0 1 1

1 0 0 1 1

1 1 1 0 0

What is oprator?

It seems like you may have a typo in your question. If you are referring to the term "operator," in mathematics and computer science, an operator is a symbol that represents a mathematical or logical operation. Operators can be used to perform arithmetic calculations, comparison operations, or logical operations in programming languages. They are essential for manipulating data and controlling the flow of a program.

What are the three parts of simple empty class?

Three parts of a simple empty java class are;

  1. A simple empty class of java supports legacy, as it automatically acquires object class, therefore can produce the functionality described in the object hierarchy.
  2. It automatically generates a fault constructor inside the class with a blank description.
  3. It also accompanies polymorphism, as can be practiced in any scheme by the extensive class.

How do you write a java program to check a number is twisted prime or not?

public class TwistedPrime

{

public static void main(int n)//Enter a number

{

int num,s=0,c=0,d;

num=n;

while(n>0)

{

d=n%10;

s=s*10+d;

n=n/10;

{

for(int i=1;i<s;i++)

{

if(s%i==0)

c++;

}

}

}

if(c==1)

System.out.print("Number is Twisted Prime");

else

System.out.print("Number is not T.P.");

}

}

What is the Difference between header file and package?

A package is just a mechanism for grouping

objects, it is very similar to grouping items

within a folder or directory on a file system. A class is found within a package, but this does not

have an impact on the class' behavior (review the

"package" access level for a slight exception). An interface, however, is a .java file that is used

(implemented) by another class to tell the outside

world that it conforms to a certain specification. For

example, you might have a "Runnable" interface

that has a "run()" method in it, by having a class that

is "Runnable" (implements Runnable) anyone using that class knows that it must have a "run()" method

defined. This is used when you have several

different classes that have the same interface. Interfaces have more in common with abstract

classes than they do with packages. An interface,

by definition, cannot have any implemented

methods; an abstract class, in contrast, can define

some methods and leave some methods to be

implemented by a subclass. Also, a class can implement many interfaces, but can only extend one

(abstract) class.

Answer by Sahe Alam Ansari, BCA. Nepal bhairahawa. Email: mrsahealam@gmail.com

Complex assignment in java?

An Assignment operator in Java is the operator that is used to assign a variable a value.

if you declare

int x = 10;

then the value 10 is assigned to the variable x. here the "=" symbol is the assignment operator.

What is Siwoloboff method - slide6?

Siwoloboff's method is a method used to establish the boiling point-composition curve of a binary system. It is particularly well adopted for the determination of boiling points of small samples of pure liquids and of mixtures.

In this method, the open end of a short capillary tube (sealed at the other end) is immersed in the liquid under investigation. The tube serves as a manometer to determine the temperature at which the vapor pressure ofthe liquid is equal to the pressure of the atmosphere (boiling point definition)

What is dynamic billboard applet?

A dynamic billboard applet is a software application that displays changing content on a digital billboard or signage. It allows for real-time updates and customization of the displayed information, such as advertisements, announcements, or event schedules. The applet typically utilizes programming languages like HTML, CSS, and JavaScript to dynamically render and refresh the content on the billboard based on predefined parameters or user interactions.

Java program to demonstrate multiple inheritance?

Inheritance is one of the building blocks of Java and it is used extensively in all java based applications. Inheritance is everywhere in Java. I can't think of one java project that I worked on, where inheritance wasn't used.

Inheritance is the feature wherein the properties/qualities of a parent class or interface is used in the child class. Both Classes & Interfaces are used in Java Inheritance

What is the method for 883 divided by 8?

Well, darling, to solve 883 divided by 8, you simply do the math. 8 goes into 88 eleven times, so you put 11 above the 8. Subtract 88 from 88 to get 0, bring down the 3, and 8 goes into 33 four times, giving you a total of 110. Voila, the answer is 110 with a remainder of 3.

What is similarities between interface and classes?

The similarities are:

a. They are both java basic object types

b. They both can contain variables and methods (With difference being class methods have implementation code whereas the interface methods can only have declarations)

c. They can both be inherited using Inheritance (extends keyword for classes and implements keyword for interfaces)

What is dynamic method dispatch in java?

Dynamic Method Dispatch in Java is when a method call is resolved at runtime based on the actual object the reference points to.

For example, if a parent class has a method and a child class overrides it, a parent reference pointing to a child object will execute the child’s version of the method.

This allows Java to decide which method to run during execution, enabling runtime polymorphism.

To dive deeper into this topic, visit the Uncodemy blog for detailed insights.

How do you map the object oriented concept using non object oriented languages?

Object oriented programming doesn't strictly require an object-oriented programming language (although those are generally best suited for the job).

Object orientation, as a concept, means to create logical representations of physical or conceptual items: a vehicle, a person, a manager, etc. Each object type (commonly called a class) has a bundle of attributes (data items, properties) and verbs (methods, functions). These bundles, together, form the class.

It is thus possible to create constructs very close to modern classes as those known in C++ using structures in C. In fact, the first C++ compilers (~20 years ago) translated C++ into C, then used an existing C compiler to generate executable code.

In C, a structure can

  • contain variables (data members)
  • pointers to functions (member functions)
  • pointers to pointers of functions (virtual functions)

Among the many standard object-oriented techniques which can not be modeled in C are

  • privacy through visibility keywords (public, private, protected)
  • inheritance (but a "derived" class can embed the "superclass" for a similar effect)
  • polymorphism
  • contracts (interfaces)
  • operator overloading

That said, object orientation as a design concept does not require an object oriented language.

Select the odd one out.a Java b Lisp c Smalltalk d Eiffel?

Oh, dude, selecting the odd one out is like choosing the black sheep of the programming family. In this case, Lisp is the odd one out because it's the only one that doesn't start with a J. But hey, they're all cool in their own nerdy way, right?

What are two occupations that match the keyword doctors?

Two occupations that match the keyword "doctors" are physicians and surgeons. Physicians are medical professionals who diagnose and treat illnesses and injuries, while surgeons specialize in performing surgical procedures to treat various medical conditions. Both occupations require extensive education and training in the medical field.

Write a programme in bluej to accept two numbers and check whether they are twin prime or not.?

class Twin_Prime

{

void Prime(int n,int m)

{

int a=0;

int b=0;

for(int i=1;i<=m+n;i++)

{

if(m%i==0)

{

a=a+1;

}

if(n%i==0)

{

b=b+1;

}

}

if(a==2)

if(b==2)

{

if(m-n==2)

{

System.out.print("The numbers "+m+" and "+n+" are Twin Prime");

}

else

if(n-m==2)

{

System.out.print("The numbers "+m+" and "+n+" are Twin Prime");

}

}

else

{

System.out.print("They are not Twin Primes");

}

}

}

What is the relationship between ICT and computer?

Information and Communication Technology (ICT) is a broad term that encompasses the use of various technologies for communication and data processing. Computers are a key component of ICT, as they are used for processing and storing data, as well as for communication through networks. In essence, computers are a fundamental tool within the realm of ICT, enabling the processing, storage, and transmission of information across various digital platforms.

In java write a program to check whether the number is even or odd and take the range from 1 to 50?

import java.util.Scanner;

public class ColEvenOdd{

public static void main (String[]args){

Scanner kb = new Scanner (System.in);

System.out.println("Enter the limiting number");

int no = kb.nextInt();//Here put the 50

System.out.println();

int i,j;

if(no==0){

System.out.println("ODD"+'\t'+"EVEN");

System.out.println(" "+'\t'+" 0 ");

System.exit(0);

}

if(no==1){

System.out.println("ODD"+'\t'+"EVEN");

System.out.println("1");

System.exit(0);

}

if(no>1){

System.out.println("ODD"+'\t'+"EVEN");

if(no%2==1){

for(i=1; i<=(no-2); i+=2){

System.out.println((i)+" "+'\t'+(i+1));

}System.out.println(no);

System.exit(0);

}

if(no%2==0){

for(j=2; j<=no; j+=2){

System.out.println((j-1)+" "+'\t'+(j));

}System.exit(0);

}

}

}

}

Give an example source code to find the given number is even or odd using method overloading in java?

The following will return true if the number provided is even: boolean isEven(int number) { return number % 2 == 0; } Repeat for other integral data types (such as long), and you have method overloading.

The following will return true if the number provided is even: boolean isEven(int number) { return number % 2 == 0; } Repeat for other integral data types (such as long), and you have method overloading.

The following will return true if the number provided is even: boolean isEven(int number) { return number % 2 == 0; } Repeat for other integral data types (such as long), and you have method overloading.

The following will return true if the number provided is even: boolean isEven(int number) { return number % 2 == 0; } Repeat for other integral data types (such as long), and you have method overloading.