My question is; are the partitions totally separate?
There are no parts of the HDD or SSD that belongs to both partition A and Partition B.
Meaning that if
I'm running my PC with Windows on partition A, do I have access to the
files stored on partition B where Ubuntu is installed?
Windows does not read the partition formats used by Ubuntu,
ext4 by default. The formatting requirements of Windows and Ubuntu are different. Ubuntu cannot be installed in NTFS, or FAT formatted partitions that Windows can read. There are third party softwares for Windows that can be used as a workaround. However, these workarounds are known to corrupt files.
say I create a .java file for work while working on Ubuntu on
partition B, can I store this file on partition A and have access to
this no matter which OS I'm currently on?
Ubuntu can read partitions formatted as FAT, or NTFS that are commonly used by Windows. The partitions created by Windows such as the Windows System Partition, commonly known as the C Drive, are not mounted by Ubuntu by default. You can change the default and mount
the C drive or the
the D drive from Windows in a suitable folder. Partitions need to be mounted in a folder to be used in Ubuntu.
Will it matter where my files (not OS) are stored, so I should
consider this when choosing the size of my partitions?
So if you create a partition C formatted NTFS (may be called
the D Drive) specifically for keeping data files and set Ubuntu to automatically mount this partition to a suitable mount-point, then you can access this partition from both Ubuntu and Windows.
There are some considerations
Fast Boot in Windows
This option set by default in most Windows installation. This option does not shut Windows down properly, but put it in hibernate like state. A side effect of this option is the Windows partitions are marked "dirty" when Windows is shutdown using the fast boot option. Under this condition Ubuntu cannot fully access the Windows system and data partitions.
/home folder in Ubuntu contains sub-folders for each user, where the user's personal data is saved by default. Instead of using the
/home folder one can mount a partition (say partition C) using the mountpoint
/home partition cannot be in the NTFS format as personal settings and configuration files are also stored in the
/home/$USER folder and some of these configuration files need specific read/write/execute permissions that Ubuntu can understand. If the
/home is a partition, rather than just a regular folder in
/ partition, it needs to be in a Linux based format such as
ext4, not NTFS.
There are ways to overcome the limitations of NTFS partition so they can be used with Ubuntu as
/home partition. But these methods are neither straight forwards nor 100 percent compatible with Windows.
Hope this helps