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

  • Home
  • SEARCH
  • 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 5978689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:33:08+00:00 2026-05-22T21:33:08+00:00

When Java (or any language capable of reflection) outputs a program, does it keep

  • 0

When Java (or any language capable of reflection) outputs a program, does it keep the names of the methods as strings within the bytecode?

I’m wondering how, for example, the following is possible without this being the case:

Class c = Class.forName("foo");
Method m[] = c.getDeclaredMethods();

Will the bytecode then contain Strings of each method field and name within the class? I’m wondering because I want to make sure all parts of my code are not easily read, without having to obfuscate everything. If there is something fundamentally wrong with my understanding of reflection, please let me know.

  • 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-05-22T21:33:09+00:00Added an answer on May 22, 2026 at 9:33 pm

    First, Method, fields and class names are stored as clear text in .class file.

    Second, additionally to reflection there are java decompilers that can restore the almost-readable code from byte code.

    Third if you want to protect your code use obfuscation. There are several popular java obfuscatotors available.

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

Sidebar

Related Questions

Is it possible in Java (or any other language) to detect if there's an
I just wondered if there are any libraries in Java or any other language
What is the advantage of local classes in Java or in any other language
According to the Java Language Specification : If there are any enclosing try statements
Is there any Java function or util class which does rounding this way: func(3/2)
I'm new to regular expressions in Java (or any language, for that matter) and
Either in C# or Java or in any other language which follows oops concepts
I want to go through all available Java (or any other language) source code
Is there any language recognition open-source for Java? Found only for c/c++. UPD: I`m
Why in java (I dont know any other programming languages) can an identifier not

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.