• Register
0 votes
52 views

Problem:

Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not?
Write an expression that whose value is the fifth character of the String name?
7 5 3
5,380 points

1 Answer

0 votes

Solution:

The correct answer is: name.charAt(4)
  
Hope this might help you.
7 4 2
10,530 points

Related questions

0 votes
1 answer 59 views
59 views
Problem: Write an expression whose value is the str that consists of the third to last character of the str associated with s I tried s[2:] didn't work. Can you please guide me with right solution?
asked Feb 19 maddi86 5.4k points
0 votes
1 answer 68 views
68 views
Solutions: I am new in programming and my logic is not good, can anyone give the right solution? Write an expression that evaluates to true if and only if the C-string s equals the C-string "end"?
asked Feb 14 maddi86 5.4k points
0 votes
1 answer 105 views
105 views
Problem: I am new in programming and stuck in a query, can anyone guide me? Write an expression that evaluates to True if the str associated with s starts with "p"?
asked Feb 17 maddi86 5.4k points
0 votes
2 answers 36 views
36 views
Problem: I am new in programming, I need help, can anyone help me? Declare an integer constant, MONTHS_IN_YEAR, whose value is 12?
asked Feb 18 maddi86 5.4k points
0 votes
2 answers 105 views
105 views
Problem: I am new to programming, so need query to get query to return max number from 3 integer? Write the definition of a method max that has three int parameters and returns the largest? Can anyone guide with correct code?
asked Feb 17 maddi86 5.4k points