1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paladinen [302]
3 years ago
10

Given the following declaration of a field in a class: public static final String GREETING = "Hi";

Computers and Technology
1 answer:
FromTheMoon [43]3 years ago
8 0

Answer:

Each object of this class has its own copy of GREETING

Explanation:

option c: Each object of this class has it’s own copy of GREETING

This is the only false statement.  When a variable is preceded by the Static key word only one copy of that variable is created, no matter the amount of object created from the instance of that class.

option a: Each object of this class can access GREETING, this is true.

option b: The value of GREETING can’t be changed in any methods, this is true because GREETING is preceded by the keyword final.

option d: GREETING.length() = 2, this is true because the method length() is use to get the length of the string "Hi" which is 2.

option e: GREETING.toUpperCase() = "HI", this is also true because the method toUpperCase()  convert all the character of "Hi" to uppercase.

Note: All these are peculiar to java programming language.

You might be interested in
You have just read about a new security patch that has been made available for your Windows system, so you install the patch as
zhenek [66]

Answer:

A

Explanation:

The best action to take is to download and install the last good update; in that case, it will override the recent unstable update.

An update is not like a single program that can be add or remove from the control panel.

6 0
3 years ago
Write a program that accepts a phrase of unspecified length on the command line. For example: prompt% letter print Operating Sys
Sedaia [141]

Answer:

Check the explanation

Explanation:

#define _MULTI_THREADED

#include <pthread.h>

#include <stdio.h>

#include <errno.h>

#define           THREADS          2

int               i=1,j,k,l;

int argcG;

char *argvG[1000];

void *threadfunc(void *parm)

{

int *num;

num=(int*)parm;

while(1)

   {

   if(i>=argcG)

   break;

   if(*num ==1)

   if(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u')

   {

   printf("%s\n",argvG[i]);

   i++;

   continue;

   }

    if(*num ==2)

   if(!(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u'))

   {

   printf("%s\n",argvG[i]);

   i++;

   continue;

   }

   sched_yield();

   }

return NULL;

}

int main(int argc, char *argv[])

{

pthread_t            threadid[THREADS];

int                  rc=0;

int                  loop=0;

int arr[2]={1,2};

argcG=argc;

for(rc=0;rc<argc;rc++)

argvG[rc]=argv[rc];

printf("Creating %d threads\n", THREADS);

for (loop=0; loop<THREADS; ++loop) {

     rc =pthread_create(&threadid[loop], NULL, threadfunc,&arr[loop]);

}

for (loop=0; loop<THREADS; ++loop) {

   rc = pthread_join(threadid[loop], NULL);

}

printf("Main completed\n");

return 0;

}

The below attached image is a sample output

3 0
3 years ago
Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. What will be the ou
lord [1]

Answer:

2

Explanation:

The output of the Java program is 2. The public Vehicle class is defined with the class variable 'counter'. When a Vehicle class object is instantiated, the counter variable increments by one.

In the program, the two instances of the class are created, incrementing the counter variable to two, the print statement outputs 2 as the result of the program.

8 0
3 years ago
Files and e-mail messages sent over the Internet are broken down into smaller pieces called _____.
Fynjy0 [20]
Files and email messages sent over the internet are broken down into smaller pieces called packets
6 0
3 years ago
The ________ of the operating system enables users to communicate with the computer system. Select one: A. user interface B. mod
Mumz [18]
The user interface of the operating system
8 0
3 years ago
Other questions:
  • Describe in one or more complete sentences how someone starting a computer repair business in a town night gain a competitive ad
    15·1 answer
  • Which of the following is an encryption tool that allows users to encrypt files and folders by simply right-clicking a given obj
    10·2 answers
  • A .jpg file is an example of which of the following file types
    15·2 answers
  • A student who sets a date to finish a goal is using which SMART goal? relevant, specific, attainable or timely
    10·1 answer
  • Dorothy needs to edit JPEG and GIF files in a multimedia application. Which software can Dorothy use to edit these files?
    8·2 answers
  • Which components exist in the contextual tab for tables called Design? Check all that apply.
    15·2 answers
  • Calculate the total and average number from 1 to 100<br>​
    12·1 answer
  • What is the computer?​
    9·1 answer
  • Explain information technology ?
    10·1 answer
  • Ginny just enrolled in a C-SNP that uses the post-enrollment verification method. When will the plan send her a termination noti
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!