Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:22:40+00:00 2026-06-06T06:22:40+00:00

I read in an article on Switch vs If that if we use String

  • 0

I read in an article on Switch vs If that if we use String as switch parameter,the compiler will not make a jump table. Is this correct and if yes, pleas explain why?

Thanks

PS

I’m more interested in knowing this regarding java. And the part I read about this is from an answer here in Stackoverflow. So here’s the link stackoverflow.com/a/395965/1043937

It says about c#, but since java also has the same feature since 1.7, Can someone please explain.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:22:42+00:00Added an answer on June 6, 2026 at 6:22 am

    Switch statements in C cannot accept strings as parameters.

    Switch statements on strings in java are available since java 1.7. They weren’t before as this block was modeled from the c feature. The fact that java uses, or not, a jump table is implementation dependent and the result also depends on the values.

    Edit : for details about the implementation, refer to the link provided by Jon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read and article talking about moving beyond 960px width for websites. This width
I read this article where Ayende states NHibernate can (compared to EF 4): Collection
after read this article i tried generate EF model by System.Diagnostics.Process: Process myProcess =
I read this article Managing Hierarchical Data in MySQL At the end of this
Recently i read an article is about prevent brute-force attack. It said that automatically
I've just read an article that supposedly introduced me to a new concept: Up
I already read many article about this issue in here, SO. I just want
I'm building site where user will register, login, switch to other users page, read
I read this article: Logical Processing Order of the SELECT statement in end of
I read this article, the parts of Intellisense and Generated Code: http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind.html Do you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.