Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Is below function can be called by a hacker after deploy
test = true;
No. A constructor is special.
It is executed on deployment but the bytecode isn't deployed to the contract address, so it can't be run again.
Hope it helps.