Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

JAVA 3 and 4

QuestionAnswer
float f = 42.0f; float[] f1 = new float[2]; float[] f2 = new float[2]; float[] f3 = f1; long x = 42; f1[0] = 42.0f; Which are true Option 1. f1 == f2 Option 2. f1 == f3 Option 3. f2 == f1[1] Option 4. x == f1[0] Option 5. f == f1[0] 2, f1 == f3 4, x == f1[0] 5, f == f1[0]
int dailywage = 4; int number_of_days = 5; int salary = number_of_days++ * --dailywage * dailywage++ * number_of_days--; salary =- dailywage; System.out.println(dailywage + " " + number_of_days + " " + salary); 4 5 266
The for loop executes a given statement or block of statements repeatedly as long as the value of the expression is true. false
What does the code output? int p=0; while (p<3) { p++; System.out.println(p); } 1 2 3
int a[] = {2}; a = new int[]{5}; int x = a[0]; while (x >= 0) { process(a); x = a[0]; x--; System.out.println("x = " + x); } private static void process(int[] a) { int x = a[0]--; x++; } x = 3 x = 2 x = 1 x = 0 x = -1
They return the result of shifting the bits of the left operand by the number of positions specified by the right operand. shift operator
Which of the following declares an array of integers named number? int [ ] number ;
What is the Enhanced for Loop (foreach)? It transverses all elements of a collection.
It consists of three operands and is used to evaluate Boolean expressions Ternary operator
arithmetic operator is a mathematical function that takes two operands and performs a calculation on them. true
if (true) { int[] str = {5}; String i = "" + str[0]; System.out.print(i); } System.out.print("-"); { int[] str = {1, 2}; System.out.print(str[1]);}System.out.print("-");{ String str = "I like Java Programming Language"; System.out.print(str);} System. 5-2-I like Java Programming Language-124
What is the result of -7%2 -1
{ int marks[] = new int[4]; marks = new int[] {87, 76, 84, 57}; for(int i = 0; i < 4; i++) { System.out.println(marks[i]);} { int marks[] = new int[4]; marks = new int[{87, 76, 84, 57}]; for(int i = 0; i < 4; i++) { System.out.println(marks[i]) ArrayOutput2 does not compile, but ArrayOutput1 will compile
What is the output of the following code fragment: int[] ar = {2, 4, 6, 8 }; ar[0] = 23; ar[3] = ar[1]; System.out.println( ar[0] + " " + ar[3] ); 23 4
bitwise operator is an operator used to perform bitwise operations on bit patterns or binary numerals that involve the manipulation of individual bits true
Consider the following codes: int x=2; System.out.println(++x); What will be the EXACT output? 3
int c = 0, e = 50; boolean b = (c == 1) && (++e < 100); System.out.println("e = " + e); boolean f = (++e < 100) && (c == 1); System.out.println("e = " + e); e = 50 e = 51
boolean lampX = false, result; boolean lampY = true; result = lampY || lampX; System.out.println("Lamp switch-on " + result); result = lampY | lampX; System.out.println("Lamp switch-on " + result); Lamp switch-on true Lamp switch-on true
What will be the output of the following program? int a = 0152; a *= --a / 2 * 2; System.out.println("a=" + a); a=11024
For which of the following applications is an array NOT suitable: Holding the name, social security number, age, and income of one individual.
Created by: PipoyKuraku
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards