I think a lot of people here gave some really good answers, including the person who got some downvotes.
240% debt-to-GDP ratio is based on a mathematical calculation. For example, currently here in the United States, we have a 105% debt-to-GDP ratio ($22Trillion ÷ $21Trillion = 1.05) That is the calculation used to arrive at that 240% you speak of.
Both are unmanageable debt-to-GDP ratios, the manageability consensus among economists being no higher than 60% debt-to-GDP ratio. So its not just unmanageable for individuals, it is indeed, unmanageable for nation-states as well, but if those figures concerning Japan are correct, why have they not entered insolvency is your burning question.
Well, remember that nation-states can sell their debt via the bonds that Alexis talked about in his answer. Human behavior is always at play here. It could be that wishful thinkers type of investors are still hopeful that Japanese policymakers will reverse course just as with U.S. Treasury holders. Additionally pointed out by Alexis, Japan is a creditor to the nation that holds the worlds reserve currency, so we have to ask ourselves, if Japan was allowed to go insolvent, what effect would it have on the nation-state who holds the worlds reserve currency? Is that a desirable outcome to the international monetary system?
The difference with an individual is, nobody really cares if you go bankrupt except your loved ones. No one has skin in the game with your finances except for you and your loved ones. With nation-states there can be a lot more at stake.
Also, much like the United States, Japan is a major world economy with credit-worthiness and can also borrow in a currency that it prints...the yen. If you could borrow money as an individual in a currency that you print, you see how you would not go bankrupt so easily despite a huge debt load?
Remember, its the interest and late fees that really do us in where we as individuals have to file for bankruptcy and we can't print more money, we have to work more hours or hit the lottery or an inheritance.
By the way, by my research, in 2017 the Japanese debt-to-GDP was more like 253%.
The good news is, if Japan can hold such a debt load, it does not seem that the United States will collapse at 105%. This does not mean all is well.
When a nation-states debt-to-GDP ratio goes above 90%, that nation has gone through the looking glass into a new world of negative marginal returns on debt, slow growth and eventual default through nonpayment, inflation or renegotiation. This day is sure to arrive for both Japan and the United States, so do not be frustrated that it has not happened, it just does not happen as quickly for a nation-state than in our own personal finances. More complexity involved, before that day comes it will be preceded by a long period of weak growth, stagnant wages, rising income inequality and social discord.
Here are a couple of resources that may also be of help to your inquiry:
The above BIS study says, "Used wisely and in moderation, [debt] clearly improves welfare. But, when [debt] is used imprudently and in excess, the result can be disaster. For individual households and firms, overborrowing leads to bankruptcy and financial ruin. For a country, too much debt impairs the governments' ability to deliver essential services to its citizens."
Have you researched whether that is already going on in Japan?
There is also the 2010 European Central Bank study:
This one says, "a higher public debt-to-GDP ratio is associated, on average, with lower long-term growth rates at debt levels above the range of 90-100% of GDP."
Notice this is not research from some fringe economics, it comes from the heart of the international monetary system and sponsored by the central banks.
So stay tuned friend as evidence is accumulating that developed economies such as Japan and in particular, the United States, are on dangerous ground and possibly past the point of no return.
For example, despite not going bankrupt the last two decades for the Japanese economy has not been great and I believe it could be possible that our next two decades here in the United States will look something like Japan's last two decades.