The key size for (symmetric) data encryption is negotiated as part of the ciphersuite, for example TLS_RSA_WITH_AES_256_CBC_SHA uses AES with 256-bit key while TLS_RSA_WITH_AES_128_CBC_SHA uses AES with 128-bit key. Java packages from Oracle (and previously Sun) out-of-the-box are limited to 128-bit strength symmetric crypto; to use AES-256 ciphersuites you need to install the 'Unlimited Strength' policy, see SSLHandshakeException while connecting to a https site but OpenJDK does not have this limitation. Note that strength is not the same as size; 3DES as used in SSL/TLS (keying option 1) has key size 168 but strength only 112 and is permitted under the 'limited' policy.
There are no '512 bit encryption' algorithms used in any SSL/TLS at all. Note that breaking 256-bit strength like AES-256 by conventional means cannot be done in our current solar system; you'd need to control at least much of the galaxy for billions of years, and to such an adversary your cat videos, bank accounts, or even business strategy are completely uninteresting. Quantum may change this, but no one knows if that will ever work, when or how well.
Yes, the RSA key is in the certificate, if you use RSA which is the most common choice but not the only one. (Except there were ephemeral RSA keys in some of the deliberately broken 'export' ciphersuites which you don't ever want to use and that have been officially prohibited in TLSv1.1 2006 and TLSv1.2 2008, and Java has disabled entirely by default since Java7 circa 2011.) Public CAs like Symantec GoDaddy etc. have not issued certificates for RSA keys smaller than 2048 bits since 2013; if you use selfsigned certs or run your own personal CA you can do so, but browsers will probably give errors or warnings.
Note that RSA-1024 has only about 80 bits of strength (which is why it is no longer considered secure) and RSA-2048 about 112; see https://www.keylength.com and
https://crypto.stackexchange.com/questions/1978/how-big-an-rsa-key-is-considered-secure-today
https://crypto.stackexchange.com/questions/6236/why-does-the-recommended-key-size-between-symmetric-and-assymetric-encryption-
https://crypto.stackexchange.com/questions/8687/security-strength-of-rsa-in-relation-with-the-modulus-size